Codex conversations with third-party models frequently stop automatically - cc-switch
Quick fix
cc-switch loses function call name/call_id during Responses API conversion. Connect DeepSeek directly to Codex, or upgrade cc-switch and retest.
Symptom
Section titled “Symptom”用ccs给codex桌面版接入第三方大模型,发了个请求,模型只回答一次就停止了,不会继续执行任务。然后就成了问一句回一句的模式。Using ccs to connect a third-party large model to the codex desktop app, I send a request and the model responds only once before stopping instead of continuing the task. It then becomes a one-question, one-answer interaction.
Codex uses the OpenAI Responses API tool-calling protocol, while third-party upstream services such as DeepSeek, Kimi, and MiniMax actually use Chat Completions-style interfaces. Plain-text chat may still return responses, but once Codex initiates a tool call, the cc-switch adapter must convert requests and responses in both directions. User investigation found that this conversion breaks: the model or proxy returns a function call with empty name and call_id fields, so Codex can only report unsupported call:, and the session stops after the first tool call, degrading into a one-question, one-answer interaction. Users confirmed that sessions do not stop when tools are unused, but Codex is largely unusable without tools. Reports cover 3.16.3, 3.19.1, and 3.19.2 and multiple models, including deepseek-v4-flash, Kimi K3, minimax-m3, and NIMO V2.5. No officially confirmed fixed version was documented when the issue was closed. This cluster also includes several related post-upgrade failures, each with a separate cause and fixed version: in #5280, after the Codex desktop app was merged into ChatGPT Desktop, switching with cc-switch overwrote its configuration or login state. Reports conflict: some users reported no problems, while others lost their login state and MCP configuration and had to reinstall. The maintainer said v3.17.0 added compatibility and could preserve the official login while switching to a third-party provider. In #3945, the “Anthropic system message promotion (#3775)” change introduced in v3.16.2 rewrote the request prefix sent to DeepSeek, breaking prefix caching, lowering the hit rate, and increasing usage; it was reverted in v3.16.4. In #3922, Codex configurations after 3.15.0 could not retrieve the complete model list; 4.0 redesigned the provider form, and 4.0.2 added a searchable model selector. In #8115, after switching models within the same conversation, usage was still attributed to the previous model name. This was an accounting issue, not a request actually being sent to the old model. It was fixed in v4.0.10, and downgrading fails because older versions refuse to open database versions 19/20. In #7322, which remains open, manually editing model pricing prevents the repair_current_model_pricing guard from ever matching, so official price changes for models such as deepseek-v4-flash never take effect.
Preferred workaround: connect DeepSeek directly to the client without the cc-switch local proxy. One user reported that DeepSeek can now connect directly to Codex. Another confirmed that Claude Code 2.1.178 can connect directly to DeepSeek without local routing and no longer returns a 400 error (#4338).
Temporary diagnosis: avoid triggering tool calls. Users confirmed that sessions do not stop when tools are not invoked. This can verify whether the problem applies, but it substantially reduces Codex usability and is not a permanent fix.
Upgrade cc-switch to the latest version and retest. Related regressions in this cluster were fixed separately: the DeepSeek cache hit-rate regression in v3.16.4, ChatGPT Desktop compatibility in v3.17.0, Codex model-list retrieval in 4.0.2, and usage attribution after switching models within a conversation in v4.0.10. After upgrading, use “Rebuild Codex Usage” under “Data Source” on the “Usage” page to reimport history. Do not downgrade: 4.0 updated the database schema, and older versions are expected to refuse database versions 19/20.
No officially confirmed fixed version for the tool-call interruption itself was documented when the issue was closed. If it still occurs after upgrading cc-switch, add your operating system, cc-switch version, connected model, and logs to the original issue.
If you manually edited a model's unit price in PricingConfigPanel, subsequent official price changes will not be applied automatically, and the interface provides no warning (#7322, unresolved). Manually verify that model's price when reconciling usage.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 7 real issues
- #3922最新版本codex无法获取全部模型 只能手动填写进去
- #39453.16.2 版本缓存命中率下降
- #4338DeepSeek已经可以直接在Claude Code 2.1.178上直接接入了,不需要开启路由都可以。
- #4341Codex接入第三方模型,对话经常自动中断
- #5280codex升级为ChatGPT后适配问题
- #7322[pricing] repair_current_model_pricing 守卫与"定价表可编辑"冲突,官方调价永久失效
- #8115使用 newapi 的站点,同时使用 GPT 6 的模型和 Deepseek V 4的模型。我在同一个对话中,前面使用的 GPT6,然后后面切换成 V4。然后它还会一直请求 GPT6
- Will the session continue if I do not use tools?
- Yes. Users confirmed that sessions do not stop when tool calls are not triggered. However, the underlying problem is the failed tool-call protocol conversion—the returned function call has empty name and call_id fields. Codex is difficult to use normally without tools, so this is only a diagnostic step.
- After Codex was upgraded to the ChatGPT desktop app, does switching with cc-switch overwrite the configuration? Is this affecting everyone?
- Reports conflict. Some users upgraded directly and could switch providers normally, while others reported that their configuration, login state, and local MCP configuration were overwritten and had to reinstall. The maintainer said v3.17.0 added support for the integration of Codex into ChatGPT Desktop, allowing third-party provider switching while preserving the official login.
- Why did the DeepSeek cache hit rate fall and actual usage increase after upgrading to 3.16.2?
- The “Anthropic system message promotion (#3775)” change introduced in v3.16.2 rewrote the request prefix sent to DeepSeek, preventing prefix-cache reuse. The change was reverted in v3.16.4, together with fixes for duplicate cache billing and inflated streaming input_tokens accounting. Upgrade to the latest version.
- How do I fix Codex configuration retrieving only part of the model list and requiring manual entry?
- This affects versions after 3.15.0. Version 4.0 redesigned the Codex provider form. Starting with 4.0.2, retrieving models from the complete form displays a searchable model selector; selecting a model automatically fills parameters such as the context window. Upgrade to the latest version and retest.
- After switching from GPT 6 to deepseek-v4-flash in the same conversation, the logs still show requests to GPT 6. Did the switch fail?
- It is most likely only a usage-attribution issue. When Codex switches models, it writes a thread_settings_applied event. Before v4.0.10, cc-switch did not recognize this event when importing usage, so later requests remained attributed to the previous model name. Upgrade to v4.0.10, then use “Rebuild Codex Usage” on the “Usage” page to reimport the data. The database is backed up automatically before rebuilding.
- Will official price changes still apply automatically after I manually edit a model's price?
- No. #7322 remains open: repair_current_model_pricing uses a guarded update and only updates when the current value still equals the old built-in value. After the price is manually saved once, official price changes for that model never apply, with no interface warning. For example, deepseek-v4-flash remains at the pre-increase values of 0.14 / 0.28 / 0.0028 (USD/M).
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.