Send deferred tools with native tool search on `OpenAICodexModel` instead of failing with a 400
Merged
AW
2mo ago+516+516+012345678901234567890123456789-11-11-01234567890123456789
openai_codex_model_profile inherits ToolSearchTool from openai_model_profile but not tool_deferral_mode, which only OpenAIProvider.model_profile sets. On Codex models with native tool search, deferred tools were withheld instead of declared, and the backend rejected every request with tools.tool_search requires at least one deferred tool. This sets tool_deferral_mode='with_tool_search' on the Codex profile.
The new VCR test was recorded against the live Codex endpoint with gpt-6-astra: the first request now carries tool_search plus the defer_loading tool, and the model finds and calls it. Before the change, the same test failed with the 400 above. I left tool_addition_mode alone since I didn't verify additional_tools on this backend.
- Closes #8692
Checklist
- Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
- No breaking changes in accordance with the version policy.
- Any permitted compatibility impact has a label, warning, migration, release note, and exact API-check waiver.
- PR title is fit for the release changelog.