thinking enabled but reasoning_content missing Claude Code
Quick fix
Disable Thinking mode in Claude Code, or upgrade cc-switch to fix Kimi/Moonshot tool call errors.
Symptom
Section titled “Symptom”API Error: 400 {"error":{"message":"thinking is enabled but reasoning_content is missing in assistant tool call message at index 2","type":"invalid_request_error"}}When using models like Kimi/Moonshot via Silicon Flow with Claude Code for multi-turn conversations involving tool calls, cc-switch discards the thinking block during Anthropic-to-OpenAI format conversion. Providers like Moonshot require the reasoning_content field in assistant tool call messages when thinking is enabled; its absence triggers an HTTP 400 error. This issue is fixed in cc-switch by injecting reasoning_content (defaulting to "tool call") for Kimi/Moonshot paths.
Upgrade cc-switch to version 3.14.2 or later. This version fixes the missing reasoning_content issue for Kimi/Moonshot paths by automatically injecting the field or using a placeholder.
If upgrading is not immediately possible, disable Thinking mode in the Claude Code interface as a temporary workaround to avoid triggering this API validation.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Why does this error only occur during tool calls?
- The error occurs during multi-turn conversations. After the model generates thinking and tool_use, Claude Code sends the history back upstream. The conversion logic loses the thinking content, causing assistant messages containing tool_calls to lack the required reasoning_content.
- Will the fix affect other OpenAI-compatible models?
- No. The fix restricts reasoning_content injection to the Kimi/Moonshot path (determined by model name or base_url), preventing unknown field pollution on generic OpenAI-compatible backends.
- Why do models hosted on Silicon Flow also report this error?
- Models hosted on platforms like Silicon Flow (e.g., Kimi) follow the same API specification. When Thinking mode is enabled and multi-turn tool calls occur, a request body lacking reasoning_content triggers a 400 error.
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.