[codex] Enable tool search for fallback models#30765
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be867fbad2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| input_modalities: default_input_modalities(), | ||
| used_fallback_model_metadata: true, // this is the fallback model metadata | ||
| supports_search_tool: false, | ||
| supports_search_tool: true, |
There was a problem hiding this comment.
Add integration coverage for fallback tool search
This flips fallback metadata to expose tool_search, which changes agent tool planning for missing-catalog models (for example default multi-agent tools become deferred behind tool_search), but the patch only updates models-manager and adds no core/suite integration coverage for the actual request payload/history path. Please add an integration test that selects an unknown model with deferred tools and asserts tool_search is available so regressions in this fallback path are caught.
AGENTS.md reference: AGENTS.md:L114-L118
Useful? React with 👍 / 👎.
| input_modalities: default_input_modalities(), | ||
| used_fallback_model_metadata: true, // this is the fallback model metadata | ||
| supports_search_tool: false, | ||
| supports_search_tool: true, |
There was a problem hiding this comment.
Keep fallback tool_search off for custom providers
With an unknown model slug on the built-in OSS/local providers or any configured OpenAI-compatible provider, we still synthesize fallback metadata, and those providers use the default capability set that permits namespace tools. Since multi-agent is enabled by default, this now advertises the nonstandard tool_search tool in every such request with deferred collaboration tools; local/third-party Responses-compatible servers that only accept standard function tools will reject the request before the model can run. Gate this on an OpenAI/Bedrock catalog capability or keep the fallback conservative for non-catalog providers.
AGENTS.md reference: AGENTS.md:L102-L110
Useful? React with 👍 / 👎.
Summary
tool_searchcapability in synthesized fallback model metadataWhy
When a requested model is absent from the available model catalog, Codex synthesizes fallback metadata. That fallback currently disables
supports_search_tool, so stale catalogs can cause newly introduced models to lose deferred MCP, plugin, extension, and collaboration tool discovery even though the current model baseline supports it.This changes the fallback to opt into tool search. Existing provider capability gating and the requirement for deferred searchable tools still apply, and this does not enable hosted web search.
Validation
just fmtjust test -p codex-models-manager(37 passed)