codex search issue
Resolved 💬 11 comments Opened Oct 7, 2025 by KushAtom23 Closed Oct 16, 2025
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.44.0
Which model were you using?
gpt-5 (reasoning high, summaries auto) and gpt-5-codex (reasoning high, summaries auto)
What platform is your computer?
Windows, but i am utilsing codex in wsl.Duplicate of #
What steps can reproduce the bug?
■ unexpected status 400 Bad Request: {
"error": {
"message": "Hosted tool 'web_search_preview' is not supported with gpt-5-2025-08-07.",
"type": "invalid_request_error",
"param": "tools",
"code": null
}
}
I’m using Codex with Azure OpenAI following the official documentation. When I attempt to use web search functionality with the codex --search command, I encounter a fatal error on both model versions.
Could someone please help clarify what might be causing this issue?
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
11 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
~/.codex/config.toml
[tools]
web_search = true
This is as well not working. Have already done it..
@KushAtom23 I am also running it from Azure. Did you find a solution for this? Any pointers would be helpful and appreciated. Thanks.
@AdithyanI nope not yet no one is responding from the community.. Pls leeme know what we can do here..
I personally speculate that the Web Search capability in Azure’s product roadmap is implemented through Grounding with Bing Search (previously known as Bing Search API, which was retired on August 11, 2025).
The Codex CLI is an OpenAI-side product. When configured to use gpt-5-codex based on Azure OpenAI (AOAI), it only adapts the model layer—but its tool extensions are not yet fully supported.
One piece of evidence is that the gpt-4o model has a version with built-in web search, whereas on AOAI, enabling web search requires explicitly configuring an Agent within Azure AI Agent Service and enabling the Grounding with Bing Search tool.
I think the search capability is provided by OpenAI, so if you use Azure or any other non-subscription method to use Codex, you cannot use this search function.
So I added the Exa MCP for codex
@tao12345666333 -- I am using enterprise version as my company has tie up with Azure.. What you said lemme have look on that..
Great.
The docs here
https://docs.exa.ai/reference/exa-mcp
@tao12345666333 -- Mate the api key which we gonna use is the paid or free one?
It depends on whether you want to pay. Of course, for now, you can use it without even configuring an API key, it's free.
--search is only support when using openai models through either your account login or an openai api key. Marking this as closed as the behavior described here is not something we intend to prioritize supporting.