Skip to content

Add tool_search support for gpt5#528

Closed
monadoid wants to merge 3 commits into64bit:mainfrom
monadoid:responses-tool-search
Closed

Add tool_search support for gpt5#528
monadoid wants to merge 3 commits into64bit:mainfrom
monadoid:responses-tool-search

Conversation

@monadoid
Copy link
Copy Markdown
Contributor

@monadoid monadoid commented Mar 17, 2026

gpt5 models have a new tool_search functionality - this adds support for it.

Updates openapi.documented.yml to the latest official documented OpenAI spec from:
https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml

The OpenAPI/API changes are additive, but the typed Rust Responses surface now includes new public struct fields and enum variants which would be a breaking change for users using the struct literals (not builders) or doing exhaustive matching.

Adds typed Responses API support for tool_search, including:

  • namespace
  • deferred namespace-contained function tools
    • tool_search_call
    • tool_search_output
    • namespace on function call items

Added tests + "client mode" and "hosted mode" examples and confirmed working.

@monadoid monadoid changed the title Add typed Responses tool_search and namespace support Add tool_search support Mar 17, 2026
@monadoid monadoid changed the title Add tool_search support Add tool_search support for gpt5 Mar 18, 2026
@64bit
Copy link
Copy Markdown
Owner

64bit commented Mar 23, 2026

Thanks for the PR, however syncing spec requires to sync whole spec, because thats the source of truth on what code reflects.

For reference, this are all the changes required to sync spec: #529

You're welcome to cleanup this PR and keep a single example for tool search.

@monadoid monadoid closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants