Skip to content

Codex switching DeepSeek model error or only showing custom - CC Switch

Quick fix

Enable local routing and ensure Codex is logged into the official account to generate models_cache.json, restoring the model list.

Error output
热切换失败: 写入 Codex 配置失败: Codex model catalog template `gpt-5.5` not found. Please start Codex once so models_cache.json is available, or ensure the `codex` CLI is on PATH.
English translation

Hot switch failed: writing Codex config failed: Codex model catalog template `gpt-5.5` not found. Please start Codex once so models_cache.json is available, or ensure the `codex` CLI is on PATH.

This issue cluster covers multiple symptoms when connecting Codex to DeepSeek/GLM/Qwen and other third-party models. There are two core causes:

1. **Missing models_cache.json**: A freshly installed Codex will not generate `~/.codex/models_cache.json` before logging into the official account. CC Switch cannot find the `gpt-5.5` template during hot switching, causing a write failure. Manually running `codex debug models --bundled > ~/.codex/models_cache.json` generates the cache file. v3.16.1 has fixed this issue.

2. **Codex desktop login state limitation**: The Codex desktop model selector determines whether to show third-party models based on whether the official ChatGPT identity is logged in. When not logged in, it forcibly falls back to the default model and shows "custom", which cc-switch cannot directly override. You must log into the official account first before configuring CC Switch.

Additionally, DeepSeek only supports the Chat Completions API by default, while Codex uses the Responses API. The protocol incompatibility causes a 404 error. Enable local routing in CC Switch for protocol conversion.

  1. Ensure Codex is logged into the official ChatGPT account to generate the `~/.codex/models_cache.json` cache file.

  2. If the cache file is still not generated, manually run the command: codex debug models --bundled > ~/.codex/models_cache.json

    ~/.codex/models_cache.json
    # 包含 gpt-5.5、gpt-5.4、gpt-5.4-mini、gpt-5.3-codex、gpt-5.2、codex-auto-review 等模型条目
  3. When configuring the DeepSeek provider for Codex in CC Switch, enable "local routing" mode so CC Switch performs the Responses API ↔ Chat Completions protocol conversion.

  4. If Codex still only shows "custom" and cannot select a model, try logging out of Codex and logging back in with a GPT account, then configure CC Switch.

  5. Upgrade CC Switch to v3.16.1 or later, which fixes the hot switching failure caused by missing models_cache.json.

ToolCodex
Version3.15.0 - 3.16.4(受影响版本),v3.16.1 起修复缓存缺失问题
PlatformsWindowsmacOS

This page is distilled from 24 real issues

Why does Codex only show "custom" after connecting DeepSeek, with no flash or pro models visible?
This is a limitation of the Codex desktop app itself: the model selector decides whether to show third-party models based on whether the official ChatGPT identity is logged in. Log into the official account in Codex first, ensure `~/.codex/auth.json` exists, then configure CC Switch.
What if the codex debug models command errors or is not found?
Ensure the `codex` CLI is installed and on PATH. If installed via Homebrew, verify the path is correct. You can also copy the `models_cache.json` file from another working Codex environment into the `~/.codex/` directory.
Why does configuring DeepSeek for Codex keep returning 404?
DeepSeek only supports the Chat Completions API format by default, while updated Codex only supports Responses API format requests. Enable "local routing" mode in CC Switch to perform protocol conversion.
What to do if the AppShots screenshot feature is unavailable when using DeepSeek?
When CC Switch generates the Codex model catalog, it inherits the visual capability flag from the GPT template (`input_modalities` includes `image`), but DeepSeek does not actually support image input. This issue has been fixed in later versions; upgrade to the latest version.
Why does the conversation often get stuck in an infinite loop after switching to DeepSeek?
This issue is still under investigation. Some users report that using DeepSeek directly with Codex does not cause infinite loops, which may be related to how the Claude Code client behaves after identifying the underlying model. It has not been confirmed as a CC Switch bug.

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.