Skip to content

400 MissingParameter: input.type on the second turn in Claude Code

Quick fix

No verified fix is available. The reporter's direct tests returned 200 with "type": "message", but the proxy patch remains a proposal.

Error output
API Error: 400
{"error":{"code":"MissingParameter","message":"The request failed because it is missing `input.type` parameter. Request id: <id>","param":"input.type","type":"BadRequest"}}

The reporter used Claude Code through the cc-switch local proxy to call deepseek-v4-flash via the 火山方舟 Responses API. The first turn succeeded, but the second returned 400 after the history included an assistant text message with array content. According to their analysis, convert_messages_to_input in src-tauri/src/proxy/providers/transform_responses.rs generates role-based message items without a top-level type field, which this model's backend strictly validates.

The reporter's direct control tests returned 200 with only user messages or tool messages converted to function_call / function_call_output. Adding "type": "message" to every message item also returned 200. The same requests succeeded with glm-5.3-flash, glm-5.3, qwen3.8-max, and deepseek-v4-pro. These are the reporter's test results. The issue remains open, and there is no confirmation that the proposed changes to the three conversion branches have been merged or released. The issue provides no verified fix for an installed cc-switch.

  1. Check whether your setup matches the report: Claude Code uses deepseek-v4-flash via the 火山方舟 Responses API through the cc-switch local proxy. The first turn succeeds, but the second fails after an assistant text message appears in the history.

  2. As a temporary workaround, try glm-5.3-flash, glm-5.3, qwen3.8-max, or deepseek-v4-pro, which succeeded in the reporter's tests through the same gateway. These results do not mean deepseek-v4-flash has been fixed.

  3. Follow issue #7552 for progress on the conversion patch. The reporter proposes adding "type": "message" to every role-based message item in the string-content, array-content, and no-content branches of convert_messages_to_input. Direct requests with the added field returned 200, but the issue provides no directly applicable patch or released fix.

ToolClaude Code
Versioncc-switch v3.20.3(报告受影响版本);Claude Code 2.1.278
PlatformsmacOS

(No FAQ yet)

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.