@yankewei/pi-web-search
pi extension that exposes provider-native web search for DeepSeek Responses and OpenAI Codex GPT-5.6 models
Package details
Install @yankewei/pi-web-search from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@yankewei/pi-web-search- Package
@yankewei/pi-web-search- Version
0.1.4- Published
- Aug 26, 2026
- Downloads
- 287/mo · 11/wk
- Author
- yankewei
- License
- unknown
- Types
- extension
- Size
- 25.8 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/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
为 pi 增加 provider-native 的 web_search 工具。
安装
pi install npm:@yankewei/pi-web-search
安装后重启 pi 即可。
原理
- 扩展向 pi 注册
web_search工具。 - 模型需要实时信息时调用该工具,扩展把查询交给当前 provider 的原生 Web Search。
- DeepSeek 使用 Responses API 的
web_search;GPT-5.6 使用 pi 的openai-codex-responses和现有 OAuth 登录。 - 返回结果中的正文引用会转换为可点击的
Sources列表;不支持的模型会返回明确错误。
扩展不实现搜索引擎,也不需要单独维护搜索 API。认证、baseUrl、headers 和环境配置由 pi 管理。
支持模型
DeepSeek:
deepseek-v4-flash
GPT-5.6(必须使用 openai-codex provider):
openai-codex/gpt-5.6-lunaopenai-codex/gpt-5.6-solopenai-codex/gpt-5.6-terra
例如:
pi --model openai-codex/gpt-5.6-luna
Codex 使用 pi 已有的 OAuth 凭证,不需要额外配置 OPENAI_API_KEY。
本地开发
npm install
npm run check
npm test
本地加载扩展:
pi -e ./src/index.ts