Skip to content

Common causes of Upstream HTTP 404 - DeepSeek / Codex in cc-switch

Quick fix

Resolve based on the scenario: if the endpoint path is the issue, complete the API address with the full API root (such as .../v1); if the model… (cc-switch)

Error output
unexpected status 404 Not Found: CC Switch local proxy failed while handling Codex endpoint /responses. Provider: DeepSeek; model: deepseek-v4-pro; upstream_status: HTTP 404; cause: 上游错误 (404):, url: http://127.0.0.1:15721/v1/responses
English translation

unexpected status 404 Not Found: CC Switch local proxy failed while handling Codex endpoint /responses. Provider: DeepSeek; model: deepseek-v4-pro; upstream_status: HTTP 404; cause: upstream error (404):, url: http://127.0.0.1:15721/v1/responses

This error usually has one of three causes:

1. **Incomplete API path**: When using a custom OpenAI Chat Completions endpoint, cc-switch does not automatically append the `/v1` path. If the configured address is `https://api.deepseek.com` instead of `https://api.deepseek.com/v1`, the request is sent to the wrong path (such as `/chat/completions` instead of `/v1/chat/completions`), resulting in a 404.

2. **Model does not support the request type**: The official DeepSeek API is text-only and does not support image input. When a conversation includes an image, it returns `No endpoints found that support image input` (HTTP 404). In addition, the official DeepSeek endpoint does not support Codex's `/responses` interface; it only supports `/chat/completions`.

3. **Conflicting model catalog fields**: In cc-switch 3.19.1, `~/.codex/cc-switch-model-catalog.json` has contradictory declarations for the same model (`input_modalities` includes `image`, but `supports_image_detail_original` is `false`). This causes the image rectifier to incorrectly determine that the model supports images and leave the image block in place; the upstream service rejects the forwarded request.

  1. Check the API endpoint configuration: make sure the custom OpenAI endpoint for Codex includes the complete API root path (such as `https://api.deepseek.com/v1` or `https://opencode.ai/zen/go/v1`), not just the domain. cc-switch treats base_url as the actual API root and appends only `/chat/completions`; it does not automatically add `/v1`.

    Codex 供应商设置中的 Base URL
    https://api.deepseek.com
    https://api.deepseek.com/v1
  2. For the official DeepSeek API: since DeepSeek does not support the `/responses` interface, use the built-in DeepSeek preset in cc-switch, which routes requests through Chat Completions, instead of manually configuring an OpenAI-compatible endpoint.

  3. For a 404 caused by an image: if the error is `No endpoints found that support image input`, the current model (such as deepseek-v4-flash) does not support image input. Switch to a model that supports images (such as 小米 MiMo v2.5), or remove images from the conversation history.

  4. To fix conflicting model catalog fields (cc-switch 3.19.1): if a conflict between `input_modalities` and `supports_image_detail_original` prevents images from being removed, manually edit the model catalog file and change the model's `input_modalities` to `["text"]`.

    ~/.codex/cc-switch-model-catalog.json
    "input_modalities": ["text", "image"]
    "input_modalities": ["text"]
  5. Upgrade cc-switch: if uploading an image in Codex returns HTTP 400 (`unknown variant image_url`), upgrade to v3.16.4 or later. That version adds a Codex image rectifier that automatically removes image blocks and retries.

ToolCodex
Versioncc-switch 3.14.1 - 3.19.1
PlatformsWindowsmacOS
Why does the official DeepSeek API return a 404 in Codex but work in Claude Code?
The official DeepSeek endpoint only supports `/chat/completions`; it does not support the `/responses` interface used by default in Codex. Use the built-in DeepSeek preset in cc-switch, which uses the Chat Completions route, instead of configuring `https://api.deepseek.com` directly as an OpenAI-compatible endpoint.
What should I do if uploading an image returns `No endpoints found that support image input`?
This happens because models such as DeepSeek are text-only and do not support image input. Switch to a model that supports images (such as 小米 MiMo v2.5), or remove images from the conversation. With cc-switch 3.19.1, conflicting model catalog fields may prevent images from being removed; you can try manually changing the model's `input_modalities` to `["text"]` in `~/.codex/cc-switch-model-catalog.json`.
Why do I still get a 404 when the endpoint is set to `https://api.deepseek.com`?
cc-switch does not automatically append the `/v1` path to a custom OpenAI endpoint. Complete the Base URL with the full API root, for example `https://api.deepseek.com/v1` or `https://opencode.ai/zen/go/v1`.
How can I fix an empty model list in the Codex desktop app when `/v1/models` returns 404?
This is a limitation of the Codex desktop app: it decides whether to show third-party models based on whether you are signed in to an official ChatGPT account. First, sign in to an official ChatGPT account once in the Codex desktop app. Then, in cc-switch settings, enable “Keep official login when switching to a third party,” make sure local routing or route takeover is enabled for the third-party provider, and fully quit and restart Codex.

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.