Codex model catalog template `gpt-5.5` not found CC Switch
Quick fix
Regenerate ~/.codex/models_cache.json and keep the Codex ChatGPT login, so CC Switch can write the route and show DeepSeek models.
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: failed to write Codex config: 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.
Codex's model catalogue `models_cache.json` is the template source CC Switch uses when writing Codex routing config. On a fresh Codex install with no login, or with the `codex` CLI missing from PATH, `~/.codex/models_cache.json` is never generated, so CC Switch fails to find the `gpt-5.5` template when enabling local routing or switching provider. Officially this was declared fixed in v3.16.0/v3.16.1, but several users still reproduce it after upgrading, so generating the cache by hand remains the method that works in practice.
A second presentation — the model list showing only 自定义 (custom) or GPT models with no `deepseek-v4-flash`/`deepseek-v4-pro` — comes from Codex desktop hiding third-party models and falling back to a default model when the official ChatGPT login is not preserved. That has nothing to do with the local cache. Some problems also come from CC Switch cloning the GPT template's vision and `apply_patch` capability fields when generating `~/.codex/cc-switch-model-catalog.json`, breaking AppShots and apply_patch. Those share a root and need editable templates (#6451) to fix properly.
Run `codex debug models --bundled > ~/.codex/models_cache.json` in a terminal to generate a cache file containing `gpt-5.5`, `gpt-5.4`, and the other models.
On a fresh Codex install, start it normally and sign in to a ChatGPT account once so `models_cache.json` is generated under `~/.codex`. If it still is not, drop a community-shared `models_cache.json` into `~/.codex/` by hand.
Keep the official ChatGPT login in Codex desktop, then go back to CC Switch and enable local routing or switch endpoint — only then does the model picker show DeepSeek flash/pro.
If it still shows only the old models, delete the old DeepSeek provider and recreate it from the built-in CC Switch DeepSeek preset (the preset is `deepseek-v4` from v3.16 on).
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 10 real issues
- #3325codex配置deepseek报错
- #3337codex 配置本地路由转发 报错
- #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 模板的视觉能力标记
- #4271接入第三方API时,比如DeepSeek、Qwen、GLM等等,codex切换模型处显示自定义 ,不能切换模型,但是实际上可以使用。我怀疑是官方模型或者其他模型冲突导致的bug。正常来说,应该是只能使用一个模型的,但是在我发现使用中有多个模型,既可以使用官方Claude code模型,在使用过程中,我并没有手动开启使用Claude code,他自己开启的。
- #4382我用cc-switch给codex配置了DeepSeek模型,但是codex上无法正常显示模型名称,也无法选择DeepSeek的flash或pro模型,而且在对话中无法看到本次对话占了多少上下文
- #4914接入deepseekAPI后codex无法搜索模型,但接入中转站可以
- #6338cc switch模型配置文件导致codex客户端apply_patch工具调用异常
- #6451请求:允许用户编辑 Codex 模型目录模板;上游支持的能力(并行工具/搜索/max推理)不应默认关闭
- Why are the models still not found after running `codex debug models --bundled`?
- First confirm `~/.codex/models_cache.json` actually contains `gpt-5.5`, `gpt-5.4`, and the rest. If Codex is not signed in or the `codex` CLI is off PATH, the file may be empty — sign in and make sure the CLI is available.
- Why does Codex show only 自定义 (custom) with no deepseek-v4-flash/pro?
- That is a Codex desktop limitation: without a preserved official ChatGPT login, the model picker hides third-party models and falls back to a default. Sign in to the official account once, then switch the CC Switch endpoint.
- Why do AppShots or apply_patch misbehave?
- The generated `~/.codex/cc-switch-model-catalog.json` inherits vision and `apply_patch` capability fields from the GPT template, and hand edits are overwritten on a switch. #6451 tracks editable templates; for now the only option is a manual temporary correction.
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.