Codex model catalog template `gpt-5.5` not found - CC Switch
Quick fix
Run codex debug models --bundled > ~/.codex/models_cache.json to generate the missing model cache, then switch the Codex route again.
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.Failed to switch routing state: 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.
When taking over or writing Codex routing config, CC Switch reads `~/.codex/models_cache.json` as its model catalogue source and expects a `gpt-5.5` template inside. If Codex has never been signed in with an official account or started at all, or you went straight to a custom DeepSeek backend, `models_cache.json` is never generated and CC Switch reports `gpt-5.5` not found while switching routes. Running `codex debug models --bundled > ~/.codex/models_cache.json` by hand fills the cache in.
The same class has several variants: an empty model list after switching (#3340) and `/model` not showing DeepSeek models (#3422) usually come from `cc-switch-model-catalog.json` not being refreshed or a leftover custom provider — delete that cache file and switch again to regenerate it. `model_provider` keeping the old key in `config.toml` (#3318) is deliberate compatibility from v3.15.0 to avoid re-bucketing Codex history; what actually applies is the content of `[model_providers.<key>]`. Routing on but `base_url` not hot-switching to `127.0.0.1` (#4082/#3756) was fixed in v3.16.2. A default model overwritten by an old database value (#5783) has to be saved on the CC Switch edit page rather than edited directly in `~/.codex/config.toml`. And v3.16.4's `AbsolutePathBuf deserialized without a base path in model_catalog_json` (#4761) was folded into #5731 by a maintainer. Note the fixes contradict each other: maintainers called v3.16.0/v3.16.1 fixed when closing #3340/#3422, yet users still reproduce on v3.16.2 and recovered variously by reinstalling Codex, turning a VPN off, or deleting and recreating the provider. Try against your own environment rather than relying on an upgrade alone.
Open a terminal and run `codex debug models --bundled > ~/.codex/models_cache.json` to generate a model cache file containing the `gpt-5.5` and other templates.
Restart Codex (start it at least once), then go back to CC Switch and enable or switch the Codex route again.
If `/model` still does not show DeepSeek models, delete `cc-switch-model-catalog.json` and switch provider again — CC Switch regenerates the catalogue.
If the model list is still empty after switching, delete that custom provider in CC Switch and recreate it. Some users in #3340 report this works.
If `base_url` does not hot-switch or still reads `https://api.deepseek.com`, upgrade to v3.16.2 or newer first. If the default model is overwritten, change 默认模型 (default model) on the CC Switch Codex provider edit page and save, rather than editing `~/.codex/config.toml` by hand.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 10 real issues
- #1337使用cc-switch配置codex的deepseek模型报错
- #3318切换第三方模型的时候,.codex/config.toml文件配置参数会相互干扰,需要先切换到官方默认,再切换到第三方。
- #3340codex客户端中还是无法显示模型名称,自定义模型为空
- #3343打开路由报错,无法写入配置文件和鉴权文件
- #3378切换路由状态失败: 写入 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.
- #3422codex--在进行过cc-switch的配置deepseek后,使用/model依旧不显示deepseek模型
- #3756切换不需要本地路由的供应商,API请求配置也会被强制改成https://127.0.0.1/v1
- #4082ccswitch开启了codex本地路由,但是并没有热修改config.toml里面的base_url,仍然保持着"https://api.deepseek.com"而不是换成"http://127.0.0.1:15721/v1"
- #4761deepseek无法正确接入
- #5783cc switch会主动覆盖config.toml的默认模型设置
- Is my `config.toml` configured wrongly?
- Not necessarily. The more common cause is a missing `~/.codex/models_cache.json`, leaving CC Switch unable to find the `gpt-5.5` model catalogue template. Run `codex debug models --bundled > ~/.codex/models_cache.json` first, then check the custom provider `base_url`/`model` in `config.toml`.
- I set a proxy in `.env`. With the proxy off Codex will not open, and with it on I cannot see the models. What now?
- Community reports disagree: some users see third-party models after turning the VPN off and restarting Codex, while others need the proxy to reach the API at all. Confirm the proxy is not intercepting the local routing address `127.0.0.1`, and that Codex and CC Switch use the same `~/.codex/config.toml`. If it still conflicts, try deleting and recreating the provider, or deleting `cc-switch-model-catalog.json` before switching again.
- Claude Code has a similar problem — will `codex debug models --bundled` fix it?
- No. `gpt-5.5 not found` is a Codex model cache problem and `codex debug models --bundled` only applies to Codex. Claude Code users reported a different error, "There's an issue with the selected model (claude-sonnet-4-6[1m]). It may not exist or you may not have access to it." The steps on this page do not apply to Claude Code.
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.