@sakiko233/pi-native-search
Minimal Pi extension for provider-native web search on OpenAI Codex, Kimi For Coding, and DeepSeek.
Package details
Install @sakiko233/pi-native-search from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@sakiko233/pi-native-search- Package
@sakiko233/pi-native-search- Version
0.3.0- Published
- Jul 30, 2026
- Downloads
- 1,115/mo · 316/wk
- Author
- sakiko233
- License
- MIT
- Types
- extension
- Size
- 22.8 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@sakiko233/pi-native-search
A minimal Pi extension that enables provider-native web search for OpenAI Codex, Kimi For Coding, and DeepSeek.
Supported providers
| Provider | Search mode | Auth source |
|---|---|---|
| OpenAI Codex | Main-request injection of { "type": "web_search" } |
Pi's openai-codex OAuth resolver |
| Kimi For Coding | Claude Code-style nested Anthropic Messages request declaring web_search_20250305 |
KIMI_API_KEY or Kimi OAuth |
| DeepSeek | Claude Code-style nested Anthropic Messages request declaring web_search_20250305 against https://api.deepseek.com/anthropic |
DEEPSEEK_API_KEY |
All other providers are intentionally unsupported.
Install
pi install npm:@sakiko233/pi-native-search
Usage
For OpenAI Codex, the extension does not register a client-side search tool. It appends a server-side { "type": "web_search" } entry to the outgoing request's existing tools list and sets tool_choice to auto:
{
"tools": [...existingTools, { "type": "web_search" }],
"tool_choice": "auto"
}
Codex keeps full access to its local tools (read, bash, edit, write) while gaining web search. The server-side web_search tool produces no client tool card.
For Kimi For Coding and DeepSeek, the extension registers a web_search tool. When the main model calls it, the extension sends a nested Anthropic Messages request declaring:
{
"type": "web_search_20250305",
"name": "web_search",
"max_uses": 8
}
The provider performs the search server-side and returns text plus search-result blocks, which the extension formats as an ordinary tool result.
Configuration
/search # open settings
/search providers # show supported providers
/search config # print current configuration
/search on # enable web search
/search off # disable web search
Configuration persists in ~/.pi/agent/search-config.json.
Development
npm install --no-save --ignore-scripts typescript
npm run typecheck
The extension is a single TypeScript file, extensions/index.ts, loaded directly by Pi.
License
MIT — see LICENSE.