anthropic.ThinkingConfig
Extended-thinking configuration (`thinking` on the Messages request).
Reference version
Signature
class anthropic.ThinkingConfigExtended-thinking configuration (thinking on the Messages request).
budget_tokens must be smaller than the request's max_tokens, and
Anthropic rejects temperature / top_p / top_k alongside enabled
thinking — the client sends what it is given and lets the API say so.
Source:<builtin>/anthropic/messages.bamlbytes 605–1127
Fields
type
string"enabled" or "disabled".
budget_tokens
int | nullStatic methods
function
disabled
() -> anthropic.ThinkingConfigTurns extended thinking off.
function
enabled
(budget_tokens: int) -> anthropic.ThinkingConfigTurns extended thinking on, with budget_tokens reserved for it.