pi-web-search 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # pi-web-search
2
2
 
3
- Provider-native web search for [pi](https://pi.dev) with Gemini + URL Context, xAI Grok, OpenAI Responses variants, and Anthropic.
3
+ Provider-native web search for [pi](https://pi.dev) with Gemini + URL Context, xAI Grok, OpenAI Responses variants, Anthropic, and OpenCode Zen/Go.
4
4
 
5
5
  ## Tools
6
6
 
@@ -17,9 +17,12 @@ Search the web using your currently selected model. Automatically picks the righ
17
17
  | OpenAI Codex | Codex Responses API web search (`openai-codex-responses`) |
18
18
  | GitHub Copilot | OpenAI Responses API web search via Copilot credentials |
19
19
  | Anthropic | Messages API web search |
20
+ | OpenCode Zen / Go | Responses API web search (models that use the `openai-responses` API) |
20
21
 
21
22
  GitHub Copilot OpenAI Responses models are supported, including Business and Enterprise seats whose API endpoint is resolved from their authenticated Copilot credentials. This includes models such as `gpt-5.6-sol`.
22
23
 
24
+ OpenCode Zen and OpenCode Go Responses models (for example `opencode-go/gpt-5.6-luna` or `opencode-go/grok-4.6`) use the same Responses web search. OpenCode routes traffic per conversation, so `web_search` sends the `x-opencode-session` and `x-opencode-client` headers pi uses, keyed to the active session. Only models exposed through that Responses API are supported: OpenCode `chat/completions` models have no provider-native search tool, and the gateway's Anthropic Messages models are unverified.
25
+
23
26
  Supports passing up to 20 additional URLs to analyze alongside the query. Successful `web_search` results are collapsed by default in pi; expand the tool call to inspect the full answer and source details.
24
27
 
25
28
  ### `url_context`
@@ -49,6 +52,10 @@ No extra config needed. Select a supported current model in pi and the tools aut
49
52
 
50
53
  When this file exists, `web_search` uses the configured provider/model first. If it is missing, `web_search` uses the current conversation model. If the selected model does not support native search, the tool returns an error instead of falling back.
51
54
 
55
+ For OpenAI Responses models (including Azure, Codex, and Copilot), `web_search` inherits the agent's current thinking level on each call. Enabled levels are clamped to the selected search model's supported levels and translated through its `thinkingLevelMap` using pi's model metadata. This also applies when `web-search.json` selects a dedicated search model. Higher effort can increase latency and cost.
56
+
57
+ When thinking is off or unavailable, or the search model is non-reasoning, the request omits `reasoning` and leaves the choice to the provider. Off does not force reasoning off: some models reject `reasoning.effort: "none"`. Google, Anthropic, and xAI behavior is unchanged.
58
+
52
59
  `url_context` is automatically removed from active tools when using a non-Gemini model.
53
60
 
54
61
  ## Test
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-web-search",
3
- "version": "1.5.0",
4
- "description": "Provider-native web search for pi: Gemini + URL Context, xAI Grok, OpenAI Responses (Azure/Codex/Copilot), and Anthropic",
3
+ "version": "1.6.0",
4
+ "description": "Provider-native web search for pi: Gemini + URL Context, xAI Grok, OpenAI Responses (Azure/Codex/Copilot), Anthropic, and OpenCode Zen/Go",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "keywords": [
@@ -15,6 +15,8 @@
15
15
  "grok",
16
16
  "openai",
17
17
  "anthropic",
18
+ "opencode",
19
+ "opencode-zen",
18
20
  "url-context",
19
21
  "url-analysis",
20
22
  "youtube"