auto-review fails with "codex-auto-review" model name not supported
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.
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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.
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:
| Route | Backend model | Backend URL |
|---|---|---|
|
deepseek-v4-pro|deepseek-v4-pro| your DeepSeek-compatible/v1URL ||
codex-auto-review|deepseek-v4-pro| the same/v1URL |Then 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.