pi-web-search-claude-bridge

Route Pi web_search through a fallback model when the current provider is claude-bridge

Packages

Package details

extension

Install pi-web-search-claude-bridge from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-web-search-claude-bridge
Package
pi-web-search-claude-bridge
Version
0.2.0
Published
Sep 18, 2026
Downloads
355/mo · 24/wk
Author
geoffreychen777
License
unknown
Types
extension
Size
13.6 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-web-search-claude-bridge

Route Pi web_search through a fallback model only while the current provider is claude-bridge. Other models keep using their own native search.

pi-claude-bridge does not expose Claude Code's builtin WebSearch, and pi-web-search cannot call a claude-bridge API. This extension fills that gap without making every model pay for a dedicated search model.

Install

Requires pi-web-search:

pi install npm:pi-web-search
pi install npm:pi-web-search-claude-bridge

Then /reload.

Behavior

Current model web_search uses
claude-bridge/* Auto-picked or configured fallback (see below)
Gemini / OpenAI Responses / Grok / Anthropic Messages The current conversation model
Other unsupported APIs pi-web-search's normal unsupported-model error

Do not also set ~/.pi/agent/web-search.json. That file is a global override and would send every search to one model.

Default model (auto)

If the config is missing, empty, or "model": "auto", the fallback is chosen from your available catalog (modelRegistry.getAvailable()), not a hardcoded provider. Models that cannot do native search are ignored.

Rank, highest first:

  1. Exact gpt-5.6-luna (any provider)
  2. Other luna ids (gpt-5.6-luna-openai-compact, …)
  3. Other GPT-5.6 Responses models (gpt-5.6-sol, gpt-5.6-terra, then the rest)
  4. GPT-5.5, GPT-5.4, GPT-6
  5. Grok
  6. Remaining OpenAI Responses, then Anthropic Messages, then Gemini

If nothing qualifies, the fallback is left empty and web_search is not rewritten.

Choose a model

/web-search-model

Opens a picker (first item is auto). You can also set it directly:

/web-search-model auto
/web-search-model mvp-lab/gpt-5.6-luna

Config

~/.pi/agent/web-search-claude-bridge.json

Auto (default):

{
  "model": "auto"
}

Pin a model:

{
  "provider": "mvp-lab",
  "model": "gpt-5.6-luna"
}

Pinned values are used as-is. Auto resolution is written to web-search-claude-bridge.resolved.json only as a runtime pointer for pi-web-search; it is not the user config.

How it works

pi-web-search honors PI_WEB_SEARCH_CONFIG when choosing a search model. This extension sets that env var only for claude-bridge sessions (and right before a web_search call), and unsets it otherwise. It does not re-register web_search, so it works regardless of package order.