Feat: Add Anthropic CUA adaptive thinking
Closed
CH
7mo ago+392+392+012345678901234567890123456789-10-10-01234567890123456789
why
what changed
test plan
Summary by cubic
Add adaptive thinking for Anthropic Claude 4.6 models in the CUA client. Uses thinkingEffort with output_config.effort, sets temperature=1, and keeps thinkingBudget for older models.
-
New Features
- Detects 4.6 models (
claude-opus-4-6,claude-sonnet-4-6) and usesthinking: { type: "adaptive" }withoutput_config.effort. - Defaults to
"medium"effort when not set and forcestemperature: 1for adaptive thinking. - Adds
ThinkingEffortandthinkingEffortinClientOptions("low" | "medium" | "high" | "max"); falls back tothinking: { type: "enabled", budget_tokens }withthinkingBudgeton older models. - Uses
computer_20251124for 4.6 andclaude-opus-4-5-20251101; tests cover effort levels, defaults and temperature, provider-prefixed names, and legacy budget behavior.
- Detects 4.6 models (
-
Migration
- For 4.6 models, set
thinkingEffort;thinkingBudgetis deprecated. Adaptive thinking setstemperature: 1automatically. - Keep using
thinkingBudgeton older Claude models. No changes needed if you don’t use thinking.
- For 4.6 models, set