Skip to content

[codex] Enable tool search for fallback models#30765

Draft
rphilizaire-openai wants to merge 1 commit into
mainfrom
dev/rphilizaire/default-fallback-tool-search
Draft

[codex] Enable tool search for fallback models#30765
rphilizaire-openai wants to merge 1 commit into
mainfrom
dev/rphilizaire/default-fallback-tool-search

Conversation

@rphilizaire-openai

Copy link
Copy Markdown
Contributor

Summary

  • enable tool_search capability in synthesized fallback model metadata
  • keep unknown or newly introduced model slugs aligned with the bundled catalog, where all current models support tool search

Why

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 fmt
  • just test -p codex-models-manager (37 passed)

@rphilizaire-openai rphilizaire-openai marked this pull request as ready for review June 30, 2026 21:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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.

1 participant