Skip to content

Codex DeepSeek HTTP 400 errors - CC Switch

Quick fix

Upgrade to v3.18.0 to fix the tool schema 400. Multi-turn tool_call_id and Responses native mode need case-by-case handling.

Error output
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'.

This cluster covers several HTTP 400 problems when Codex reaches DeepSeek through CC Switch. The most common: the Codex built-in tool codex_app__automation_update carries a JSON null in its parameters field under the Responses API, and once CC Switch converts to Chat Completions format, strictly validating upstreams like DeepSeek reject it with a 400. Fixed in v3.18.0 by PR #4706 / #5315, which normalises tool parameters to {"type":"object"}. There is also a 400 for a missing messages.tool_call_id during a continuing conversation, tracked under #4973. Separate problems include DeepSeek not supporting image_url, an over-limit context not being compacted automatically, misspelled model names, and Responses native mode configuration.

  1. Upgrade CC Switch to v3.18.0 or newer, which fixes the HTTP 400 caused by type:null in the codex_app__automation_update tool schema.

  2. If you hit a missing messages.tool_call_id after several conversation turns on DeepSeek, follow issue #4973 — this cluster names no confirmed fix version.

  3. If DeepSeek supports the Responses API for you, switch the DeepSeek provider to Responses mode in CC Switch. Users report it works with routing turned off afterwards, with no need to edit config.toml by hand.

  4. Check the model name is spelled correctly — use deepseek-v4-flash or deepseek-v4-pro, not deepseek-v4-falsh.

ToolCodex
Version3.16.1 - 3.17.0 受影响;v3.18.0 修复工具 schema type:null 问题
PlatformsWindowsmacOS
Will every DeepSeek 400 disappear after upgrading to v3.18.0?
Not necessarily. What v3.18.0 explicitly fixes is the 400 from tool parameters being type:null, such as codex_app__automation_update. A missing messages.tool_call_id, an over-limit context, image recognition, and a wrong model name are different problems.
Can DeepSeek read images?
An issue shows deepseek-v4-pro cannot read image_url, and a maintainer said CC Switch cannot make it work — the DeepSeek model itself has to be multimodal.
How should config.toml look now that DeepSeek supports the Responses API?
Users report that switching the DeepSeek setting to Responses mode and turning routing off just works, with no need to edit config.toml by hand — though environments differ.
Why does it error once the context passes 256K?
An issue reports that going over the context limit through CC Switch + Codex returns a 400 outright, with no automatic compaction. This cluster records no fix.

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.