<thinking> tags output as body text in Claude Code
Quick fix
Changing the provider's apiFormat from openai_chat to anthropic, if supported upstream, can bypass inline
Symptom
Section titled “Symptom”<thinking>tool call</thinking>
日志很大。我先看当前配置和最近的日志内容。<thinking>tool call</thinking> The log is large. I will first check the current configuration and the recent log content.
When Claude Code uses `apiFormat: "openai_chat"`, the Anthropic streaming conversion path outputs `choice.delta.content` directly as a `text` block without stripping inline `<thinking>...</thinking>` tags at the start of the stream. Thinking content is therefore displayed in plain text together with the response.
This occurs with the `<thinking>` variant: existing handling recognizes only `<think>` or covers only the Codex path, not this Claude conversion path. The issue report confirms that, if the upstream supports the native Anthropic interface, switching to the `anthropic` format avoids this conversion path.
Confirm that the upstream provider supports the native Anthropic interface.
Change this provider's `apiFormat` from `openai_chat` to `anthropic` so requests use the passthrough path and avoid this streaming conversion.
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.