Files
hermes-agent/plugins/web/openai_native/__init__.py
lyswty 82c77ff9b9 feat(web): add openai-native backend for Codex server-side web_search
Declares OpenAI's provider-executed Responses `web_search` built-in in place of
the client-side `web_search` function, mirroring the existing xAI native-search
path. Selected via `web.search_backend: openai-native`; search-only, so
`web_extract` keeps resolving to its own backend.

The Responses adapter already recognises built-in tool types
(`_RESPONSES_BUILTIN_TOOL_TYPES`) and preflight passes them through, so the only
missing piece was the swap itself plus a provider name for the config to point at.

Gating is deliberate: two-sided (Codex backend AND a selected openai-native
backend) and fail-closed, so a custom OpenAI-compatible endpoint or an
unresolved provider leaves the client tool untouched.
2026-09-19 01:44:49 -07:00

10 lines
277 B
Python

"""OpenAI native web search plugin — bundled, auto-loaded."""
from __future__ import annotations
from plugins.web.openai_native.provider import OpenAINativeWebSearchProvider
def register(ctx) -> None:
ctx.register_web_search_provider(OpenAINativeWebSearchProvider())