unexpected status 404 Not Found: CC Switch Codex /responses
Quick fix
Upgrade cc-switch to v3.16.4+ and set the upstream format explicitly to Chat Completions on the Codex provider form.
Symptom
Section titled “Symptom”unexpected status 404 Not Found: CC Switch local proxy failed while handling Codex endpoint /responses.
Provider: DeepSeek; model: gpt-5.5; upstream_status: HTTP 404;
cause: 上游错误 (404):, url: http://127.0.0.1:15721/v1/responsesunexpected status 404 Not Found: CC Switch local proxy failed while handling Codex endpoint /responses. Provider: DeepSeek; model: gpt-5.5; upstream_status: HTTP 404; cause: upstream error (404):, url: http://127.0.0.1:15721/v1/responses
Codex sends OpenAI Responses API requests to the local proxy at /v1/responses. Upstreams that only speak Chat Completions, DeepSeek among them, have no /responses endpoint and return HTTP 404. The main problem in this cluster is the cc-switch local proxy not translating the Responses request into /v1/chat/completions per the provider apiFormat = "openai_chat", and instead forwarding /responses to upstream as-is.
Maintainers explain this relates to the v3.16.4 change decoupling the upstream format selector from the model mapping switch: the upstream format (Chat Completions / Responses) became an independent, always-visible selector no longer tied to the local routing / model mapping switch. For a provider like DeepSeek that only supports Chat Completions, you have to select Chat Completions explicitly before the Responses→Chat conversion runs. Some users also mention images or multimedia in a session crashing it similarly, but the mainline fix is the upstream format setting. #6334 is an HTTP 401 variant under the same error template, reporting an invalid or expired API key — a credentials problem that should not be conflated with this 404 routing conversion.
Upgrade cc-switch to v3.16.4 or newer.
Open the Codex provider config form, find 上游格式 (upstream format) in the advanced API options, and set it explicitly to Chat Completions.
Save the config, restart Codex, and retry in a new session.
If the error is HTTP 401 saying The API Key appears to be invalid or may have expired, check and update that provider API key rather than only changing the upstream format.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 4 real issues
- #3601unexpected status 404 Not Found: CC Switch local proxy failed while handling Codex endpoint /responses
- #4429不能直接连接deepseek
- #4539Bug: Codex + DeepSeek 返回 404 — /v1/responses 端点未翻译为 Chat Completions API
- #6334unexpected status 401 Unauthorized: CC Switch local proxy failed while handling Codex endpoint /responses. Provider: Kimi For Coding; model: MiniMax-M3; upstream_status: HTTP 401;
- Why does MiniMax work while DeepSeek reports 404?
- Both may have apiFormat openai_chat, but in practice the DeepSeek route did not trigger the Responses→Chat conversion. Setting the upstream format explicitly to Chat Completions sends the request to /v1/chat/completions.
- I already enabled local routing — why still 404?
- Enabling local routing is not the same as completing the format conversion. From v3.16.4, you have to select Chat Completions explicitly in the upstream format selector before the Responses→Chat conversion runs.
- Does reopening the session or switching model help?
- Users report recovering by reopening a session after images or multimedia crashed it, but the mainline 404 still needs the upgrade and the upstream format set to Chat Completions.
- Is a 401 Unauthorized the same problem?
- #6334 uses the same error template but with upstream_status HTTP 401, caused by an invalid or expired API key. Check credentials first, then investigate the routing format.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.