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.
Symptom
Section titled “Symptom”热切换失败: 写入 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.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.
Ensure Codex is logged into the official ChatGPT account to generate the `~/.codex/models_cache.json` cache file.
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 等模型条目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.
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.
Upgrade CC Switch to v3.16.1 or later, which fixes the hot switching failure caused by missing models_cache.json.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 24 real issues
- #383如何使用千问或Deepseek模型自带的联网搜索功能?
- #1565无法接入poe api到claude code
- #2580有没有和我一样使用英伟达或者 OpenRouter 这种三方的免费 API,它就有问题
- #2792使用opencode的deepseek-v4-flash-free模型会报错400
- #2891给codex 自定义配置deepseek或者glm模型,测试一直报错404。给claude code 配置deepseek/glm就没有问题
- #2921Claude桌面端无法调用第三方模型
- #2998cc 3.15.0 deepseek 模型提示 reasoning_content
- #3017Claude Code 渲染异常,部分模型的输出变成列表
- #3244Claude desktop 模型映射失败
- #3250Claude 桌面端路由不支持 claude-haiku-4-5-20251001,导致 Explore 子 Agent 报"模型路由未配置"
- #3325codex配置deepseek报错
- #3337codex 配置本地路由转发 报错
- #3342最新版的deepseek的模型默认错误
- #3386codex模型映射是不显示的吗?
- #3461热切换失败: 写入 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.
- #3481[Bug] Codex + DeepSeek 配置下 AppShots 功能不可用 — model catalog 继承了 GPT 模板的视觉能力标记
- #3527更新3.16版本后,原来配置的模型除了deepseek,其他的无法使用了
- #4271接入第三方API时,比如DeepSeek、Qwen、GLM等等,codex切换模型处显示自定义 ,不能切换模型,但是实际上可以使用。我怀疑是官方模型或者其他模型冲突导致的bug。正常来说,应该是只能使用一个模型的,但是在我发现使用中有多个模型,既可以使用官方Claude code模型,在使用过程中,我并没有手动开启使用Claude code,他自己开启的。
- #4382我用cc-switch给codex配置了DeepSeek模型,但是codex上无法正常显示模型名称,也无法选择DeepSeek的flash或pro模型,而且在对话中无法看到本次对话占了多少上下文
- #4914接入deepseekAPI后codex无法搜索模型,但接入中转站可以
- #4950deepseek无法连通
- #5047切换deepseek,对话经常死循环(和上下文无关)
- #6338cc switch模型配置文件导致codex客户端apply_patch工具调用异常
- #6451请求:允许用户编辑 Codex 模型目录模板;上游支持的能力(并行工具/搜索/max推理)不应默认关闭
- 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.
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.