Anthropic::ThinkingConfig
Inherits JSON::Serializable < Struct < Value < Object
Extended thinking configuration
Enable extended thinking to let Claude show its reasoning process.
# Enable with token budget
thinking: Anthropic::ThinkingConfig.enabled(budget_tokens: 1600)
# Or disable
thinking: Anthropic::ThinkingConfig.disabled
Constructors
Adaptive thinking (Opus 4.6+)
Lets the model decide how much thinking to use based on the task.
Enable extended thinking with a token budget
new(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
budget_tokens
Sourcedisplay
Controls how thinking content appears in the response: "summarized",
"omitted", or "updates". Requires the
thinking-display-updates-2026-08-18 beta for "updates" (see
Anthropic::THINKING_DISPLAY_UPDATES_BETA); the Messages resource
methods attach it automatically when display is set.
type
Source