struct

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

Adaptive thinking (Opus 4.6+)

Lets the model decide how much thinking to use based on the task.

Source
disabled

Disable extended thinking

Source
enabled(budget_tokens : Int32) : self

Enable extended thinking with a token budget

Source
new(type : String, budget_tokens : Int32 | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

budget_tokens
Source
type
Source