Invalid messages.content.type Parameter Claude Code
Quick fix
Most related issues remain unresolved. Upgrade to a version containing the #7656 fix so Chinese image-rejection errors trigger image fallback retries.
Symptom
Section titled “Symptom”messages.content.type 参数非法,取值范围 ['text']Invalid messages.content.type parameter; allowed values: ['text']
When Claude Code sends a request containing an image block through cc-switch's `openai_chat` conversion path, a text-only upstream returns a Chinese 400 error. Image-rejection keyword matching in v3.20.1 primarily uses English patterns and does not match this Chinese error, so it is passed through unchanged. Once an image enters the conversation history, later requests continue to fail.
Upgrade cc-switch to a version containing the #7656 fix. The fix adds Chinese patterns for image-rejection error matching; when a request contains an image block, it replaces the image with placeholder text and retries.
For a session that continues to return the same 400, send the request again after upgrading so fallback retries can process image blocks in the history.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
(No FAQ yet)
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.