Skip to content

Support Codex client-executed tool_search #140

Description

@haoshan98

Problem statement / motivation

The gateway does not recognize the Responses API tool_search declaration or its tool_search_call and
tool_search_output items. As a result, Codex cannot reliably load deferred tool definitions, continue the tool-search round trip, or call the selected tool through the gateway. The existing conversion also drops defer_loading from function declarations.

Proposed solution

Add typed, end-to-end support for client-executed tool_search across request conversion, streaming, persistence, and continuation. Forward the declaration natively, preserve defer_loading, return completed search calls to Codex, and replay matching call/output items in order. For providers without native deferred loading, safely expose validated loaded functions while preserving namespace and collision rules. Codex remains responsible for searching and executing client-owned tools; the gateway must not implement the search itself.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions