-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Please explain the motivation behind the feature request.
Goose currently uses the deprecated thinking: {type: "enabled", budget_tokens: N} API for Anthropic extended thinking (via CLAUDE_THINKING_ENABLED and CLAUDE_THINKING_BUDGET env vars). Anthropic has introduced adaptive thinking as the replacement, available on Claude Sonnet 4.6 and Opus 4.6. With adaptive thinking, Claude decides if and when to think based on problem complexity, rather than always consuming a fixed token budget. The deprecated budget_tokens parameter will eventually stop working on newer models.
Relevant code:
crates/goose/src/providers/formats/anthropic.rscrates/goose/src/providers/formats/databricks.rs
Describe the solution you'd like
Support the new adaptive thinking API payload:
{"thinking": {"type": "adaptive", "effort": "high"}}- Add a
CLAUDE_THINKING_EFFORTenv var acceptinglow,medium,high,max(default:high) - When set, use
type: "adaptive"instead oftype: "enabled" - Keep
CLAUDE_THINKING_ENABLEDas the toggle - Deprecate
CLAUDE_THINKING_BUDGETwith a warning if set - Consider surfacing effort as a config option (not just env var) longer term
Describe alternatives you've considered
- Keep using the deprecated
budget_tokensAPI -- works for now but will break on future models. - Skip env vars entirely and auto-detect model support -- cleaner but less user control over effort levels.
Additional context
-
Anthropic adaptive thinking docs: https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking
-
Effort levels:
low,medium,high,max -
Similar issues in other projects: Roo Code #11223, LibreChat #11828
-
I have verified this does not duplicate an existing feature request