Codex DeepSeek HTTP 400 报错 - CC Switch
Quick fix
升级到 v3.18.0 修复工具 schema 400;多轮 tool_call_id 与 Responses 原生模式问题需按场景处理。
Symptom
Section titled “Symptom”CC Switch local proxy failed while handling Codex endpoint /responses. Provider: DeepSeek; model: deepseek-v4-flash; upstream_status: HTTP 400; cause: Invalid schema for function 'codex_app__automation_update': schema must be a JSON Schema of 'type: "object"', got 'type: null'.该集群包含多种 Codex 经 CC Switch 接入 DeepSeek 时的 HTTP 400 问题。最常见的是 Codex 内置工具 codex_app__automation_update 在 Responses API 中的 parameters 字段为 JSON null,CC Switch 转换为 Chat Completions 格式后,DeepSeek 等严格校验上游拒绝并返回 400。此问题在 v3.18.0 通过 PR #4706 / #5315 修复,会把工具 parameters 归一为 {"type":"object"}。另有连续会话时缺少 messages.tool_call_id 的 400 报错,归并到 #4973 跟踪。还有 DeepSeek 不支持 image_url、上下文超限不自动压缩、模型名拼写错误、Responses 原生模式配置等独立问题。
将 CC Switch 升级到 v3.18.0 或更新版本,修复 codex_app__automation_update 工具 schema type:null 导致的 HTTP 400。
如果使用 DeepSeek 时遇到连续多轮对话后报缺少 messages.tool_call_id,请查看 issue #4973 的进展;当前集群中未给出已确认修复版本。
如果 DeepSeek 已支持 Responses API,可在 CC Switch 中将 DeepSeek provider 切换为 Responses 模式;有用户反馈切换后关闭路由可正常使用,无需手动改 config.toml。
检查模型名是否拼写正确,例如应使用 deepseek-v4-flash 或 deepseek-v4-pro,不要传入 deepseek-v4-falsh。
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”本页汇总自 15 个真实 issue
- #3777Qwen3.6 256K上下文问题
- #3921Codex配置了deepseek-v4-pro后无法识别图片
- #4615claude-desktop 代理将子代理(Agent/Subagent)的已解析模型名拒返回 400
- #4793schema must be a JSON Schema of 'type: "object"', got 'type: null'.
- #4803设置定时任务,调用tool出现: model: deepseek-v4-pro; upstream_status: HTTP 400; cause: Invalid schema for function 'codex_app__automation_update': schema must be a JSON Schema of 'type: "object"', got 'type: null'.
- #4839codex 通过 cc 转发到deepseek的 创建定时任务提示词 报错
- #5009codex接入deepseek messages.tool_call_id 报错问题一直没有解决
- #5048[Bug] DeepSeek 返回 400: function schema 缺少 type: "object"
- #5340有报错
- #5354CC switch Codex使用deepseek fail。
- #5384接入deepseek,所有插件无法使用
- #5426codex 接入deepseek, 还是400报错
- #5528[@chrome](plugin://chrome@openai-bundled) 打开Product Hunt 首页,找出今天最热门的3个新发布产品,总结它们各自的特点,并附上对应的访问链接。出错
- #5576在openai中使用电脑操控插件无法正常使用(使用deepsdseeek接入)
- #5959Deepseek v4 flash正式版发布后 兼容性问题
- 升级到 v3.18.0 后所有 DeepSeek 400 都会消失吗?
- 不一定。v3.18.0 明确修复的是 codex_app__automation_update 等工具 parameters 为 type:null 导致的 400。缺少 messages.tool_call_id、上下文超限、图片识别、模型名错误等是不同问题。
- DeepSeek 能识别图片吗?
- 有 issue 显示 deepseek-v4-pro 无法识别 image_url,维护者表示 CC Switch 无法做到,需要 DeepSeek 模型本身支持多模态。
- DeepSeek 支持 Responses API 后 config.toml 怎么写?
- 有用户反馈直接把 DeepSeek 设置切换到 Responses 模式并关闭路由即可正常使用,不需要手动修改 config.toml;但不同环境可能有差异。
- 上下文超过 256K 后为什么会报错?
- 有 issue 报告通过 CC Switch + Codex 时上下文超限会直接返回 400,不会自动压缩;该问题未在本集群中确认修复。
这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。