Install
Install with PiG
pig install npm:@yankewei/pi-web-searchInstall with Pi
pi install npm:@yankewei/pi-web-searchReview before installing
Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./src/index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.5 (README.md). PiG does not review it.
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