Skip to content

Support Anthropic adaptive thinking#792

Open
ebeigarts wants to merge 1 commit into
crmne:mainfrom
ebeigarts:feature/anthropic-adaptive-thinking
Open

Support Anthropic adaptive thinking#792
ebeigarts wants to merge 1 commit into
crmne:mainfrom
ebeigarts:feature/anthropic-adaptive-thinking

Conversation

@ebeigarts
Copy link
Copy Markdown

Support Anthropic adaptive thinking

Newer Claude models (Opus 4.7+) reject thinking.type "enabled" and
require type "adaptive" with output_config.effort instead. Send the
adaptive format when an effort is given, keep the budget_tokens format
when a budget is given, and merge output_config so structured output
and adaptive thinking compose.

Fixes #782

Newer Claude models (Opus 4.7+) reject thinking.type "enabled" and
require type "adaptive" with output_config.effort instead. Send the
adaptive format when an effort is given, keep the budget_tokens format
when a budget is given, and merge output_config so structured output
and adaptive thinking compose.

Fixes crmne#782

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.58%. Comparing base (6e634fd) to head (dc39201).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
+ Coverage   87.55%   87.58%   +0.03%     
==========================================
  Files         125      125              
  Lines        5872     5880       +8     
  Branches     1460     1465       +5     
==========================================
+ Hits         5141     5150       +9     
+ Misses        731      730       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Anthropic: thinking.type.enabled not supported, should use adaptive format for new models

1 participant