3 -Web fetch, search, and image-analysis tools for Pi.
3 +Web fetch, search, site-map, and image-analysis tools for Pi.
25 25 optional; declared by schema.
26 26 Current `web_fetch` execution uses the Pi/tool abort signal and does not
27 27 pass this value to `fetchUrlStream`.
29 + optional; returns matching line excerpts instead of the full visible output.
31 + optional; line context around `linesMatching` hits.
33 + - discovers site maps and related links.
67 73 Pi model registry providers `zai`, `z-ai`, `z.ai`, `bigmodel`; fallback env
68 74 `ZAI_API_KEY`, `Z_AI_API_KEY`.
69 75 - Z.AI search endpoint/options:
70 - `ZAI_SEARCH_MCP_URL`, `ZAI_SEARCH_BASE_URL`, `ZAI_SEARCH_FRESHNESS`,
71 - `ZAI_SEARCH_CONTENT_SIZE`, `ZAI_SEARCH_LOCATION`.
76 + `ZAI_BASE_URL`, `ZAI_SEARCH_MCP_URL`, `ZAI_SEARCH_BASE_URL`,
77 + `ZAI_SEARCH_FRESHNESS`, `ZAI_SEARCH_CONTENT_SIZE`, `ZAI_SEARCH_LOCATION`.
73 79 Pi model registry provider `minimax`; fallback env `MINIMAX_API_KEY`.
74 80 - MiniMax base URL:
82 88 - `web_fetch` uses native `fetch` with browser-like headers and a per-host
90 +- `web_fetch` accepts only HTTP and HTTPS URLs.
91 + Private/reserved IP targets, blocked DNS answers, and unsafe redirects are
93 +- Fetch output is stored in the Pi state directory with a `responseId` and
95 + Tool-visible text is capped; full output stays on disk.
96 +- `linesMatching` returns numbered excerpts with optional surrounding context.
84 97 - Content routing is based on `Content-Type`:
86 99 strips common prompt-injection delivery vectors, extracts main content,
113 126 untrusted external data.
114 127 Image, media, and binary early-return paths are not wrapped by the current
129 +- `web_map` discovers site maps from robots.txt, sitemap XML, and llms links.
116 130 - `web_search` provider order:
117 131 OpenAI Codex native search when authenticated, then Z.AI Coding Plan MCP when
118 132 configured, then MiniMax search when configured, then DuckDuckGo HTML.
120 134 `week`, `month`, `year`, or no-limit values.
121 135 - DuckDuckGo fallback throttles requests to at least 2 seconds apart and reports
122 136 captcha/dedup diagnostics.
137 +- MiniMax search posts to `/v1/coding_plan/search`.
123 138 - `understand_image` sends the prompt and image data to MiniMax VLM.
124 139 It accepts HTTP/HTTPS URLs, data URLs, and local files.
125 140 Local file data is base64 encoded before the request.