Skip to content

Support adaptive thinking for Claude Opus 4.6 #12485

@leeweisern

Description

@leeweisern

Anthropic has deprecated thinking.type: "enabled" with budget_tokens on Opus 4.6 and will remove it in a future release. The recommended replacement is adaptive thinking:

{
  "thinking": { "type": "adaptive" },
  "output_config": { "effort": "high" }
}

Docs: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking

Currently variants() in transform.ts uses the deprecated config for all Anthropic models, including Opus 4.6:

high: { thinking: { type: "enabled", budgetTokens: ... } },
max:  { thinking: { type: "enabled", budgetTokens: ... } },

A few things to consider:

  • Only Opus 4.6 supports adaptive — older models still need type: "enabled"
  • effort: "max" is Opus 4.6 exclusive
  • maxOutputTokens() assumes a known budgetTokens for the subtraction — adaptive doesn't have one
  • Depends on @ai-sdk/anthropic supporting type: "adaptive" upstream

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions