Skip to content
WRAITHERIXDocsENRU

Reasoning models

Reasoning models spend extra “thinking” tokens before they answer. Thinking tokens are billed as output tokens and reported in usage.

Use reasoning_effort on Chat Completions (low, medium, high):

r = client.chat.completions.create(
model="gpt-5.6-luna",
messages=[{"role": "user", "content": "How many prime numbers are below 100?"}],
reasoning_effort="low",
)
print(r.choices[0].message.content)
print(r.usage.completion_tokens_details.reasoning_tokens)

On the Responses API use reasoning: {"effort": "low"}.

Use the Anthropic Messages format and a thinking budget:

import anthropic, os
client = anthropic.Anthropic(base_url="https://api.wraitherix.com",
api_key=os.environ["WRAITHERIX_API_KEY"])
m = client.messages.create(
model="claude-opus-5-5",
max_tokens=4000,
thinking={"type": "enabled", "budget_tokens": 2000},
messages=[{"role": "user", "content": "Is 391 a prime number? Explain."}],
)
for block in m.content:
print(block.type, getattr(block, "text", ""))

budget_tokens must be lower than max_tokens. The model may use less than the budget for simple questions.

Effort Use for
low Chat, extraction, classification — fastest and cheapest.
medium General coding and analysis.
high Hard maths, multi-step planning, complex debugging.