You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
auto-review fails with "codex-auto-review" model name not supported #31255
What version of the Codex App are you using (From “About Codex” dialog)?
26.623.13972.0
What subscription do you have?
No
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
When running commands that require sandbox escalation (require_escalated), the auto-review system consistently fails with an upstream API error. The auto-review passes model name codex-auto-review to the backend, but the API only accepts deepseek-v4-pro or deepseek-v4-flash.
What steps can reproduce the bug?
Automatic approval review failed:
{"error":{"message":"{"error":{"message":"The supported API model names are
deepseek-v4-pro or deepseek-v4-flash, but you passed codex-auto-review.",
"type":"invalid_request_error","param":null,"code":"invalid_request_error"}}",
"type":"upstream_error","code":"400"}}
What is the expected behavior?
The auto-review should evaluate the escalation request and either approve or reject it based on policy.
Hit the same issue independently (Azure OpenAI custom model_provider instead of a DeepSeek-compatible one, but same underlying symptom — the guardian sends the literal codex-auto-review model id to a backend that has no such deployment/model, the review call 404s/400s, and since the guardian fails closed on any review error, the underlying action gets denied as "unacceptable risk" instead of surfacing the real cause).
Root cause: codex-rs/core/src/guardian/review.rs, guardian_review_session_config already has fallback logic to use the active session's real model when the preferred review model (codex-auto-review) isn't available — but the fallback never triggers for custom providers, because the model catalog it checks against (ModelsManager::list_models) is filtered by auth mode/visibility only, not by whether the active provider can actually serve that specific model id. codex-auto-review is a visible catalog entry for API-key auth in general, so the lookup succeeds even when the active provider (Azure, DeepSeek-compatible, etc.) has no such model, and the literal id gets sent upstream.
Suggested fix — only trust the catalog match for the default preferred model when the provider is actually OpenAI-hosted (same signal already used for gating image_generation_runtime_enabled in codex-rs/core/src/tools/spec_plan.rs); always honor an explicit auto_review_model_override:
Verified locally against an Azure OpenAI custom provider: sandbox escalation approvals that previously failed closed with a 404 for codex-auto-review now correctly fall back to the active session's real model and succeed.
Full write-up (environment, repro, root cause, fix) in #31732 — closing that one as a duplicate of this issue since this was filed first. Happy to open a PR for the fix above if invited.
For the DeepSeek setup in the original report, you can keep your normal model
unchanged and route Codex's fixed codex-auto-review name to deepseek-v4-pro through a local gateway.
Install Swobu and create a codex
workspace with these two explicit Responses routes:
Route
Backend model
Backend URL
deepseek-v4-pro
deepseek-v4-pro
your DeepSeek-compatible /v1 URL
codex-auto-review
deepseek-v4-pro
the same /v1 URL
Then point Codex at that workspace in ~/.codex/config.toml:
model = "deepseek-v4-pro"model_provider = "swobu"
[model_providers.swobu]
name = "Swobu"wire_api = "responses"base_url = "http://127.0.0.1:7926/c/codex/v1"
Codex does not need an API key for the loopback Swobu endpoint. Configure any
real backend credential on both Swobu targets.
I reproduced this route: Codex's model: "codex-auto-review" request reached
the backend as model: "deepseek-v4-pro".
This is a gateway workaround, not a Codex fix. The backend must support the
Responses behavior used by auto-review. I have not tested the Azure deployment
configuration mentioned later in this thread, and this does not apply to the
first-party Responses-Lite failure reported in other issues.
Disclosure: I maintain Swobu. If you try this, please share the result. For a
Swobu-specific failure, include the error and backend setup at github.com/swobuforge/swobu, and I will
help investigate.
You need to supply your own model catalog which sets the auto review model override.
Here is a sample prompt you can use and codex should be able to patch itself. Just set the target model to whichever one you want.
Create a patched model catalog for my installed codex version.
Copy the matching stock catalog, change only the `auto_review_model_override` from `null` to "gpt-5.6-sol".
Save it under `~/.codex/`. Then, set `model_catalog_json` to the patched catalog in `~/codex/config.toml`
The drawback to this approach is that your catalog won't be up to date when you get a install a new version of codex. To fix that simply recreate the patch
Running into this too, still happening as of Sep 25.
I'm on Codex CLI v0.156.1 (macOS) with Azure OpenAI as a custom provider (wire_api = "responses") and approvals_reviewer = "auto_review". My main model is gpt-6-astra and it works fine, it's only auto review that breaks.
Any command that needs escalation gets denied before it even runs. For me it was an scp upload to a test server:
Automatic approval review failed: unexpected status 404 Not Found: The API deployment for this resource does not exist. ... url: https://<resource>.openai.azure.com/openai/v1/responses
So the agent just sits there asking me to switch back to manual review lol. Looks like the same thing described in #31732, the reviewer sends codex-auto-review to Azure and Azure doesn't have it.
Even just falling back to manual approval when the reviewer call fails would be a huge help. Happy to test a fix on Azure if that's useful!
Running into this too, still happening as of Sep 25.
I'm on Codex CLI v0.156.1 (macOS) with Azure OpenAI as a custom provider (wire_api = "responses") and approvals_reviewer = "auto_review". My main model is gpt-6-astra and it works fine, it's only auto review that breaks.
Any command that needs escalation gets denied before it even runs. For me it was an scp upload to a test server:
Automatic approval review failed: unexpected status 404 Not Found: The API deployment for this resource does not exist. ... url: https://<resource>.openai.azure.com/openai/v1/responses
So the agent just sits there asking me to switch back to manual review lol. Looks like the same thing described in #31732, the reviewer sends codex-auto-review to Azure and Azure doesn't have it.
Even just falling back to manual approval when the reviewer call fails would be a huge help. Happy to test a fix on Azure if that's useful!
We hit this on the desktop app with DeepSeek (model_provider = "deepseek", wire_api = "responses", approvals_reviewer = "auto_review"). Two things that cost us a day, in case they help others:
1. The catalog override only applies in a fresh app-server process. The desktop app talks to a daemon that survives app restarts, and the catalog is read once, at daemon start (same root cause as #47917). On our machine codex debug models showed "auto_review_model_override": "deepseek-flash", but reviews kept failing with The supported API model names are deepseek-flash, deepseek-v4-pro, but you passed codex-auto-review: the daemon had been running since before the override was written, and it still had the old catalog. Quitting and reopening the app does not restart the daemon. codex app-server daemon restart does, and escalations went through right after. So the workaround above needs one extra step: patch the catalog, then restart the daemon.
2. The override is easy to lose. It lives on each model in the catalog, and anything that regenerates the file resets it. DeepSeek's own setup script writes auto_review_model_override: null for every model, so re-running it breaks auto-review again. A provider-level setting would survive that:
resolved before the built-in default, the way Amazon Bedrock already overrides approval_review_preferred_model() in-tree.
We built that in a fork: config field in model-provider-info, one shared resolver used by the core guardian and the guardian-v2 reviewer paths, schema and thread-config proto updated, tests for the resolver and the guardian. It fixes the DeepSeek case with no catalog patching. Code PRs aren't accepted here, so the diff is ready if anyone wants it. Tell me where to put it.
Activity
github-actions commentedon Jul 6, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
amansman77 commentedon Jul 9, 2026
Hit the same issue independently (Azure OpenAI custom
model_providerinstead of a DeepSeek-compatible one, but same underlying symptom — the guardian sends the literalcodex-auto-reviewmodel id to a backend that has no such deployment/model, the review call 404s/400s, and since the guardian fails closed on any review error, the underlying action gets denied as "unacceptable risk" instead of surfacing the real cause).Root cause:
codex-rs/core/src/guardian/review.rs,guardian_review_session_configalready has fallback logic to use the active session's real model when the preferred review model (codex-auto-review) isn't available — but the fallback never triggers for custom providers, because the model catalog it checks against (ModelsManager::list_models) is filtered by auth mode/visibility only, not by whether the active provider can actually serve that specific model id.codex-auto-reviewis a visible catalog entry for API-key auth in general, so the lookup succeeds even when the active provider (Azure, DeepSeek-compatible, etc.) has no such model, and the literal id gets sent upstream.Suggested fix — only trust the catalog match for the default preferred model when the provider is actually OpenAI-hosted (same signal already used for gating
image_generation_runtime_enabledincodex-rs/core/src/tools/spec_plan.rs); always honor an explicitauto_review_model_override:Verified locally against an Azure OpenAI custom provider: sandbox escalation approvals that previously failed closed with a 404 for
codex-auto-reviewnow correctly fall back to the active session's real model and succeed.Full write-up (environment, repro, root cause, fix) in #31732 — closing that one as a duplicate of this issue since this was filed first. Happy to open a PR for the fix above if invited.
metrofun commentedon Jul 31, 2026
For the DeepSeek setup in the original report, you can keep your normal model
unchanged and route Codex's fixed
codex-auto-reviewname todeepseek-v4-prothrough a local gateway.Install Swobu and create a
codexworkspace with these two explicit Responses routes:
deepseek-v4-prodeepseek-v4-pro/v1URLcodex-auto-reviewdeepseek-v4-pro/v1URLThen point Codex at that workspace in
~/.codex/config.toml:Codex does not need an API key for the loopback Swobu endpoint. Configure any
real backend credential on both Swobu targets.
I reproduced this route: Codex's
model: "codex-auto-review"request reachedthe backend as
model: "deepseek-v4-pro".This is a gateway workaround, not a Codex fix. The backend must support the
Responses behavior used by auto-review. I have not tested the Azure deployment
configuration mentioned later in this thread, and this does not apply to the
first-party Responses-Lite failure reported in other issues.
Disclosure: I maintain Swobu. If you try this, please share the result. For a
Swobu-specific failure, include the error and backend setup at
github.com/swobuforge/swobu, and I will
help investigate.
voski commentedon Sep 24, 2026
There is a workaround you can use.
You need to supply your own model catalog which sets the auto review model override.
Here is a sample prompt you can use and codex should be able to patch itself. Just set the target model to whichever one you want.
The drawback to this approach is that your catalog won't be up to date when you get a install a new version of codex. To fix that simply recreate the patch
zanwenfu commentedon Sep 25, 2026
Running into this too, still happening as of Sep 25.
I'm on Codex CLI v0.156.1 (macOS) with Azure OpenAI as a custom provider (wire_api = "responses") and approvals_reviewer = "auto_review". My main model is gpt-6-astra and it works fine, it's only auto review that breaks.
Any command that needs escalation gets denied before it even runs. For me it was an scp upload to a test server:
Automatic approval review failed: unexpected status 404 Not Found: The API deployment for this resource does not exist. ... url: https://<resource>.openai.azure.com/openai/v1/responsesSo the agent just sits there asking me to switch back to manual review lol. Looks like the same thing described in #31732, the reviewer sends codex-auto-review to Azure and Azure doesn't have it.
Even just falling back to manual approval when the reviewer call fails would be a huge help. Happy to test a fix on Azure if that's useful!
voski commentedon Sep 26, 2026
Did you attempt the fix I posted?
l33tdawg commentedon Sep 29, 2026
We hit this on the desktop app with DeepSeek (
model_provider = "deepseek",wire_api = "responses",approvals_reviewer = "auto_review"). Two things that cost us a day, in case they help others:1. The catalog override only applies in a fresh app-server process. The desktop app talks to a daemon that survives app restarts, and the catalog is read once, at daemon start (same root cause as #47917). On our machine
codex debug modelsshowed"auto_review_model_override": "deepseek-flash", but reviews kept failing withThe supported API model names are deepseek-flash, deepseek-v4-pro, but you passed codex-auto-review: the daemon had been running since before the override was written, and it still had the old catalog. Quitting and reopening the app does not restart the daemon.codex app-server daemon restartdoes, and escalations went through right after. So the workaround above needs one extra step: patch the catalog, then restart the daemon.2. The override is easy to lose. It lives on each model in the catalog, and anything that regenerates the file resets it. DeepSeek's own setup script writes
auto_review_model_override: nullfor every model, so re-running it breaks auto-review again. A provider-level setting would survive that:resolved before the built-in default, the way Amazon Bedrock already overrides
approval_review_preferred_model()in-tree.We built that in a fork: config field in
model-provider-info, one shared resolver used by the core guardian and the guardian-v2 reviewer paths, schema and thread-config proto updated, tests for the resolver and the guardian. It fixes the DeepSeek case with no catalog patching. Code PRs aren't accepted here, so the diff is ready if anyone wants it. Tell me where to put it.docs(research): correct claims and add test plan after PR #1583 review
fix: address cubic review of 2f8a17b on PR #1583