Provider switch not taking effect / Codex request failed (cc-switch)
Quick fix
After switching providers such as DeepSeek in cc-switch, upgrade cc-switch and use its enable/save action as the sole way to write live configuration; do not…
Symptom
Section titled “Symptom”根据操作配置不生效,之前还是有用的,今天重启电脑后就这样了The configuration does not take effect as expected. It was working before, but it started happening after I restarted my computer today.
The reports in this cluster describe the same visible symptom—configuration was switched but did not take effect—but point to several different mechanisms:
1) The most typical cause is the scope of configuration file writes (#2966, #656): when switching providers or models, the target application's configuration file (hermes agent's config.yaml or Claude's JSON configuration) was not fully rewritten, leaving the default model, provider, or base_url set to the old values. This was fixed around v3.15.0/v3.16.0. In #2966, the maintainer confirmed that switching also updates `model.default`, `model.provider`, and `model.base_url` (base_url is read from the new provider's `base_url` / `baseUrl`).
2) Another category involves the runtime request path rather than failed file writes (#3591, #6936): requests fail or return 429 when forwarded through the local proxy (127.0.0.1:15721) enabled by “Feature Enhancement/Takeover.” Logs show `上游连接失败: error sending request`; Claude forwarding succeeds in the same process while Codex fails. In #6936, the issue reproduced on macOS across 3.17–3.20.1. One user had changed no configuration, and the issue resolved after a restart; a certificate issue was suspected. This variant remains unconfirmed.
3) There are also issues with the target model itself (#3255, #3864): the upstream model name may no longer exist (for example, `claude-haiku-4-5-20251001` was discontinued), or a change to the test model field may not have been saved successfully. Both can appear as “changes not taking effect.”
Note: the 429 in #3591 and the connection failure in #6936 appear more like intermediary provider rate limiting or a network stack issue, distinct from the configuration-writing bugs in #2966/#656. If the steps below do not resolve the issue, identify which category applies.
Upgrade cc-switch to the latest version (v3.20.0+ / v4.0): v3.15.0/v3.16.0 fixed the issue where switching providers did not update model.default/provider/base_url; v4.0 also reworked local routing and request forwarding, and writes only key fields, covering more cases.
When switching providers, click “Enable” or “Save” for the target provider in the cc-switch interface (do not only change the model ID and exit). This lets cc-switch regenerate the target application's live configuration. Do not manually edit hermes agent's config.yaml or Claude's JSON configuration file; the next enable/save action will overwrite the entire file.
以 hermes agent 的 config.yaml 为例:切换后应由 cc-switch 同步写入以下三项,不要只改 model.default model:default: DeepSeek-V4-Flashprovider: moarkbase_url: https://api.moark.com/v1If all Codex requests still fail after upgrading while Claude Code works normally (the #6936 scenario): turn off or switch the system proxy, PAC, or v2ray and retry. Check the `[Forwarder]` logs for the relevant time in ~/.cc-switch/logs/cc-switch.log to confirm whether they show “上游连接失败”. On environments such as macOS 13 that cannot be upgraded, there is no confirmed fix for this issue; some users report that it resolved on its own after several days and a restart (a certificate issue is suspected).
If the error says a model “does not exist or has been discontinued” (#3255): change the model name in the provider form to one that actually exists upstream (for example, deepseek-chat), save, and test again. The test model field must be saved successfully to take effect.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 7 real issues
- #656【供应商设置Deepseek不生效】
- #2966hermes配置文件无法切换默认模型
- #3255DeepSeek 测试模型 claude-haiku-4-5-20251001 不存在或已下架
- #3591使用中转api登陆codex可以正常使用,但是通过codex增强切换后会报429 too many requests
- #3864codex接入DeepSeek apikey失败
- #6465[Bug] openai_responses 启用/保存会把 catalog 的 reasoning levels 重置为 none/high
- #6936MacOS 13 上 cc-switch 全部 provider 检查与应用内更新不可用,codex 请求 API 失败
- I switched to DeepSeek in cc-switch, but hermes agent / Claude still has the old configuration. Why?
- This is the issue reported in #2966/#656: older versions updated only some fields. Upgrade to v3.16.0+; switching will also write model.default, model.provider, and model.base_url. Then click “Enable/Save” in cc-switch to regenerate the configuration.
- Logging in to Codex directly with an intermediary API works, but after switching through cc-switch I get 429 too many requests. Why?
- This behavior was reported in #3591. One user resolved it by switching the provider to deepseek. The maintainer judged that the 429 was more likely caused by the intermediary provider rate-limiting requests based on their characteristics. Local routing was rewritten in v4.0. If the issue still occurs on the latest version, provide the intermediary provider's name and the logs for the relevant time from ~/.cc-switch/logs/cc-switch.log so it can be diagnosed.
- On macOS, all Codex requests through the cc-switch proxy fail while Claude Code works, and checking for updates also fails. What should I do?
- See #6936: the issue reproduced on 3.17–3.20.1 and was unrelated to toggling the system proxy/PAC/v2ray. One user reported that it resolved on its own after several days and a restart without upgrading the system; a certificate issue was suspected. There is no confirmed fix for this scenario. Upgrading macOS was reported to help in a similar case (#3968).
- The error says the test model claude-haiku-4-5-20251001 does not exist or has been discontinued. What should I do?
- The upstream model name is no longer valid; this does not mean cc-switch failed to write the configuration. Change the model in the provider settings to one that is actually available (such as deepseek-chat) and save.
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.