Tool 'web_search_preview' is not supported with gpt-5.1-codex-max-2025-12-04.

Resolved 💬 6 comments Opened Jan 28, 2026 by gaoconggit Closed Jan 29, 2026
💡 Likely answer: A maintainer (sayan-oai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

0.92.0

What subscription do you have?

azure

Which model were you using?

gpt-5.1-codex-max

What platform is your computer?

linux

What terminal emulator and version are you using (if applicable)?

_No response_

What issue are you seeing?

{
"error": {
"message": "Tool 'web_search_preview' is not supported with gpt-5.1-codex-max-2025-12-04.",
"type": "invalid_request_error",
"param": "tools",
"code": null
}
}

What steps can reproduce the bug?

[features]
web_search_request = false

---
It worked fine after downgrading to version 0.91.0.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

6 Comments

sayan-oai contributor · 5 months ago

@gaoconggit Thanks for the report. We're in the process of deprecating the old web_search_request feature flag and moving to a top-level web_search value that can be "live", "cached", or "disabled".

In your case, I think setting web_search="disabled" in your config.toml should solve this. Let me know if that doesn't work.

There will be an explicit deprecation notice in the next CLI version; sorry for the confusion.

jcbartle · 5 months ago

In my testing, web_search = "disabled' needs to be at the top-level section of your config.toml above any other sections. Otherwise the setting isn't getting picked up.

sayan-oai contributor · 5 months ago

@jcbartle, can you share the relevant snippet of your config.toml where it's not getting picked up? It should get picked up both as a top-level field as well as a field in any profiles you define in your config.toml. If it's set under a profile, it will only apply when running codex with that profile.

jcbartle · 5 months ago

Hi, @sayan-oai. Thanks for reaching out. I have an extremely basic config file on my machine, so I'm sure this is my fault. Here's the relevant, anonymized snippet:

Working:

model = "gpt-5.2-codex-2026-01-14"
model_provider = "azure"
model_reasoning_effort = "medium"
web_search = "disabled"

[model_providers.azure]
name = "Azure OpenAI"
base_url = "https://<base_url_value>"
wire_api = "responses"
env_key = "AZURE_OPENAI_API_KEY"
env_http_headers = { "api-key" = "AZURE_OPENAI_API_KEY" }

Not working:

model = "gpt-5.2-codex-2026-01-14"
model_provider = "azure"
model_reasoning_effort = "medium"

[model_providers.azure]
name = "Azure OpenAI"
base_url = "https://<base_url_value>"
wire_api = "responses"
env_key = "AZURE_OPENAI_API_KEY"
env_http_headers = { "api-key" = "AZURE_OPENAI_API_KEY" }

web_search = "disabled"

Which now looking at it makes sense as it probably interprets that as being part of the model_providers.azure section...

sayan-oai contributor · 5 months ago

Yeah, it's being interpreted as part of model_providers and not being picked up; this is a TOML quirk.

If you're in VSCode/Cursor, you can avoid these sorts of issues by using the Even Better TOML extension and setting the schema association for that file to https://developers.openai.com/codex/config-schema.json. That'll give you helpful field autocompletion and diagnostics for misconfigurations like this one.

jgador · 5 months ago

This is the second time that Codex in VS had breaking changes.