Skip to content

[Bug]: claude-opus-4-7 / claude-sonnet-4-6 报错 thinking.enabled is not supported — 模型未被识别为 adaptive thinking 系列 #16086

@BernaLiuDev

Description

@BernaLiuDev

Bug Description

Using claude-opus-4-7 or claude-sonnet-4-6 via a third-party Anthropic-compatible provider (not official Anthropic) results in a 400 error:

API Error: 400 {"error":{"type":"<nil>","message":"\"..enabled\" is not supported for this model. Use \"..adaptive\" and \"output_config.effort\" to control thinking behavior."}}

After disabling thinking and continuing an existing conversation that previously had thinking blocks, a second error occurs:

API Error: 400 {"error":{"type":"<nil>","message":"\"..content.0: Invalid signature in thinking block\""}}

⚠️ Note: The Anthropic provider used here is a third-party relay/aggregator, not the official api.anthropic.com. However, the provider supports Claude 4.x models and follows the same Anthropic API spec.

Root Cause (traced via source code)

In getAnthropicReasoningParams() (v1.9.11), claude-opus-4-7 is not recognized by isSupportAdaptiveThinkingClaudeModel() or isClaude46SeriesModel(), so it falls through to the legacy branch:

// Falls through to this — WRONG for Claude 4.x
return { thinking: { type: "enabled", budgetTokens: ... } }

Claude 4.x API no longer accepts type: "enabled" and requires thinking: { type: "adaptive" } + output_config.effort instead.

Steps To Reproduce

  1. Configure a third-party Anthropic-compatible provider
  2. Select model claude-opus-4-7 or claude-sonnet-4-6
  3. Enable any reasoning effort level (lightbulb icon in input bar)
  4. Send any message → first 400 error appears
  5. Disable thinking, continue existing conversation → second 400 error ("Invalid signature in thinking block")

Expected Behavior

Cherry Studio should send thinking: { type: "adaptive" } + output_config.effort for Claude 4.x models (claude-opus-4-7, etc.), consistent with the current Anthropic API spec.

Workaround

  • Disable thinking (lightbulb icon → off / default)
  • Use Cmd+K to reset context in existing topics that previously had thinking blocks enabled

Platform

macOS

Version

v1.9.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    ModelsCategorizes an issue or PR as relevant to SIG LLM

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions