[ ABORT TO HUD ]
SEQ. 1
SEQ. 2

Extended Thinking & Budget Tokens

🧠 Extended Thinking & Adaptive Reasoning20 min1100 BASE XP

The Extended Thinking Mechanism

Anthropic's Extended Thinking on Claude 3.7 Sonnet allows the model to produce a hidden, detailed chain of thought before generating its final answer. This unlocks state-of-the-art performance on complex programming, algorithmic problem solving, and formal mathematical reasoning.

Configuring Thinking in the Messages API

Extended thinking is configured via the thinking object in the request body:

{
  "model": "claude-3-7-sonnet-20250219",
  "max_tokens": 16000,
  "thinking": {
    "type": "enabled",
    "budget_tokens": 4096
  },
  "messages": [
    { "role": "user", "content": "Write an optimized red-black tree in Rust with full invariant tests." }
  ]
}

Critical API Rules for Thinking:

  • Minimum Budget: budget_tokens must be at least 1,024 tokens.
  • Max Tokens Constraint: max_tokens must be strictly greater than budget_tokens.
  • Temperature Restriction: When thinking is enabled, temperature must be set to 1.0 (or omitted/default). Setting non-default temperature, top_p, or top_k will return a 400 Bad Request error.
  • Thinking Blocks: The API returns thinking content inside a thinking block (type: "thinking"), followed by the visible answer in a text block.
SYNAPSE VERIFICATION
QUERY 1 // 3
What is the minimum budget_tokens allowed when enabling Extended Thinking on Claude 3.7 Sonnet?
100 tokens
512 tokens
1,024 tokens
4,096 tokens