@rejot-dev/pi-openai-search
v1.0.2
Published
A pi package that injects OpenAI's native web_search tool into the provider request payload.
Readme
pi-openai-search
A small pi extension that adds OpenAI's native web_search tool to OpenAI Responses requests.
What it does
When the active model uses openai-responses or openai-codex-responses, the extension patches the outgoing provider payload to include:
- the built-in OpenAI
web_searchtool - response includes for web search results and sources
For all other model providers, it does nothing.
What it doesn't do
Since the web_search tool is server-side/hosted by OpenAI, a tool call message is NOT shown in the Pi TUI.
Pi currently has no (easy) way of handling OpenAI's custom web_search_call event type.
Install
pi install npm:@rejot-dev/pi-openai-searchFor local development:
pi -e ./packages/pi-openai-search/index.ts