pi-openai-web-search

OpenAI Responses native web_search tool for the pi coding agent

Packages

Package details

extension

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

$ pi install npm:pi-openai-web-search
Package
pi-openai-web-search
Version
0.0.2
Published
Oct 25, 2026
Downloads
507/mo · 507/wk
Author
mkusaka
License
MIT
Types
extension
Size
7.4 KB
Dependencies
0 dependencies · 3 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-openai-web-search

A pi extension that adds a web_search tool backed by OpenAI's native Responses API web_search tool.

When the model calls web_search, the extension sends a separate Responses request that forces OpenAI's hosted web_search tool. It uses the credentials pi already holds for the openai provider (API key or Sign in with ChatGPT), so no extra API key is needed.

Install

pi install npm:pi-openai-web-search

Use

Log in to the openai provider. The model can then call web_search with a query. The result is the answer text followed by its source URLs.

Searches run on openai/gpt-6-luna regardless of the conversation model. Set PI_OPENAI_WEB_SEARCH_MODEL to use another openai model.

See docs/design.md for why search runs as a separate request and how the model was chosen.

Development

bun install
bun fmt --check
bun run lint
bun run typecheck
bun test

License

MIT