@rejot-dev/pi-openai-search

A pi package that injects OpenAI's native web_search tool into the provider request payload.

Package details

extension

Install @rejot-dev/pi-openai-search from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@rejot-dev/pi-openai-search
Package
@rejot-dev/pi-openai-search
Version
1.0.2
Published
May 4, 2026
Downloads
not available
Author
schuttejan
License
MIT
Types
extension
Size
2.4 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

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_search tool
  • 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-search

For local development:

pi -e ./packages/pi-openai-search/index.ts