Skip to main content
Applies to Claude Opus 5.5 / Sonnet 5.5 / Haiku 5.5 / Fable 5.1 / Fable 5 / Opus 5 / Sonnet 5 / Opus 4.8 / 4.7 / 4.6 / 4.5. Parameters and defaults reflect Anthropic’s official documentation as of 2026-11-08 (UTC+8). If the provider changes them later, the official docs and the live response win.

Key takeaways

  • Claude 5-generation and newer models think by default: Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.1, Fable 5, Opus 5 and Sonnet 5 all use adaptive thinking. Opus 4.8, 4.7, 4.6 and 4.5 do not think by default; you must pass thinking explicitly.
  • Thinking tokens count toward max_tokens and are billed as output tokens. max_tokens is the hard cap; effort is a soft steer. Lowering effort reduces overall spend, but it does not guarantee thinking stays under a specific number.
  • Some 5-generation models cannot turn thinking off: thinking: {"type": "disabled"} returns 400 on Opus 5.5, Fable 5.1 and Fable 5. Sonnet 5.5 uses thinking: {"type": "between_tools"} to disable upfront thinking. Haiku 5.5 and Opus 5 accept disabled when effort is high or lower. Sonnet 5 accepts disabled directly.
  • When effort is omitted, most models default to high; only Opus 5.5 and Haiku 5.5 default to medium.
  • Read usage.output_tokens_details.thinking_tokens for the split. usage.output_tokens includes thinking; if the two are equal, the visible text is zero.

Model quick reference

This table lists base models currently sold. Only models whose “turn thinking off” column says disabled accept thinking: {"type": "disabled"}. Models marked 400 have no off switch; lower effort instead.

effort: levels, defaults and selection

Five levels

Per-model availability

  • Every effort-capable model supports low / medium / high.
  • xhigh: Fable 5.1, Fable 5, Opus 5.5, Opus 5, Opus 4.8, Opus 4.7, Sonnet 5.5, Sonnet 5 and Haiku 5.5. Opus 4.6 and Sonnet 4.6 do not support xhigh.
  • max: all of the above, plus Opus 4.6 and Sonnet 4.6.
  • Opus 4.5: supports effort, but only alongside budget_tokens; Sonnet 4.5 and Haiku 4.5 do not support effort.

Defaults

  • Opus 5.5 and Haiku 5.5 default to medium.
  • Every other effort-capable model defaults to high.
  • Setting effort to the model default behaves exactly like omitting it.

How to choose

  • Opus 5.5 coding / agents: start at high; use xhigh for long-running, long-chain work; drop to medium only after evals show quality holds.
  • Sonnet 5.5: the provider suggests starting at medium for well-scoped agent coding, then raising to high for harder tasks.
  • Haiku 5.5: low is enough for classification, extraction and routing; raise it when reasoning demands grow.
  • Cost first: dropping one level is usually gentler than switching models. But effort is a soft signal — hard problems may still think at low. Do not treat it as a hard budget.
  • Never pass adaptive as an effort value: adaptive is a thinking mode, not an effort level; putting it in output_config.effort returns 400.

The thinking parameter: four forms

Omit thinking

The model default applies: 5-generation models think; 4.7 / 4.8 / 4.6 / 4.5 do not. For most 5-generation use cases you can simply omit it.

adaptive

{"type": "adaptive"} lets the model decide whether and how deeply to think, with effort steering overall spend. Opus 4.7 / 4.8 use it to turn thinking on; 4.6 also supports it; 5-generation models already think by default, so passing it just confirms the default.

disabled and between_tools

  • {"type": "disabled"}: only works on models where the table allows it. Opus 5.5, Fable 5.1 and Fable 5 return 400; Opus 5 and Haiku 5.5 accept it only when effort is high or lower.
  • {"type": "between_tools"}: Sonnet 5.5 only. It disables upfront thinking while keeping progress updates between tool calls; it accepts only low / medium / high, and cannot be combined with display, budget_tokens or other fields.
If a model cannot turn thinking off, do not hunt for an “off” parameter: Opus 5.5, Fable 5.1 and Fable 5 can only reduce thinking by lowering effort. Passing disabled just returns 400.

Legacy enabled + budget_tokens

This is the extended-thinking form for 4.5 / 4.6:
Models from 4.7 onward removed this form and return 400. Some APIYI routes may silently ignore deprecated parameters, but that does not mean the parameter took effect; new code should use adaptive + output_config.effort.

display: whether thinking text comes back

  • omitted (default): the thinking block still appears, but its thinking field is empty. This is the default on 5-generation models, Fable 5.1 / 5, Opus 5, Sonnet 5, Opus 4.8 / 4.7 and Haiku 5.5.
  • summarized: returns a thinking summary. Opus 4.6, Sonnet 4.6 and earlier default to this.
  • omitted only hides the text; thinking tokens are still billed at full length.
  • What you get is a summary, never raw chain-of-thought. Do not ask the model to dump internal reasoning into the response — on 5-generation and Fable models this can trigger a refusal (stop_details.category: "reasoning_extraction").

Request examples

Opus 5.5: omit thinking, steer with effort.
Sonnet 5.5: disable upfront thinking, keep progress updates between tools.
To see the thinking summary, set display explicitly:

Response and streaming

content is an array of blocks; thinking blocks come before text blocks:
In streaming, thinking does not use text_delta; it has its own event sequence: Common stop_reason values:
When max_tokens is greater than 21,333, the official SDK requires streaming (a client-side check, not an API limit). If you do not need event-by-event handling, use client.messages.stream(...).get_final_message().
See Claude Response Handling for the full response shape.

max_tokens: thinking counts, empty text starts here

max_tokens caps thinking + text + tool calls, not text alone. Set it too low and thinking consumes the budget before any text is written. A real shape: a code-change task with about 44k input tokens and max_tokens: 30000 spent all 30,000 on thinking, returned stop_reason: max_tokens, and produced zero text. Raising the cap above 64,000 gives the same effort room to write. Guidance:
  • For coding, long-form and agent work, start at 64,000; give it 128,000 when a single run must produce a lot of code.
  • max_tokens is a cap, not a reservation. Generation stops when done and you pay for actual tokens.
  • If input + cap exceeds the context window, 4.5 and newer models accept the request and stop at the window edge with stop_reason: model_context_window_exceeded instead of erroring.
  • On HTTP 200 with empty text, check stop_reason and thinking_tokens before assuming an API fault. See Why a reasoning model returns an empty response.

Multi-turn and tools: replay thinking blocks verbatim

  • Inside a tool loop, replay is mandatory: put the previous thinking block back into messages together with its tool_use block, signature included. Do not edit, reorder, or keep the text while dropping the signature.
  • Across turns, replay is recommended: Opus 4.5 and newer Opus, Sonnet 4.6 and newer Sonnet, Haiku 5.5 and Fable 5.1 / 5 retain previous turns by default; older models strip them automatically, so you do not need to prune by hand.
  • Do not rely on cross-generation reasoning when switching models: a thinking block can only be read by the model that produced it and a fixed set of other models. Opus 5.5 can read Opus 5 and older Opus / Sonnet / Haiku blocks, but not Fable / Mythos; unreadable blocks are dropped without an error.
  • History is append-only: changing system, tools or earlier messages breaks the prefix check; changing the thinking config or effort mid-conversation also invalidates the prompt cache from that point.
  • For the classic invalid-signature error, see How to fix Claude’s invalid thinking signature.

Compatibility and common 400s

APIYI may silently ignore some deprecated parameters. A missing 400 does not prove the request never reached the provider model. Remove legacy parameters as the official docs require.

APIYI setup notes

  • Anthropic native: https://api.apiyi.com with /v1/messages; use the ClaudeCode group.
  • OpenAI-compatible: https://api.apiyi.com/v1 with /v1/chat/completions; use the default / svip groups.
  • The gateway translates the native Anthropic format to the upstream format and does not add thinking / effort for you. Thinking is the model’s own default behavior.
  • On 5-generation models, thinking blocks are bound to the model and the conversation prefix. Design for append-only history; do not edit earlier messages between turns.

Official documentation

Anthropic’s docs, copy the URL into your browser. Parameters and the current model list follow the official source.

Claude API Basics

Endpoints, auth, groups and a minimal request

Claude Response Handling

Content blocks, SSE events and stop_reason

Claude Prompt Caching

Cache writes, reads and billing

Why a reasoning model returns an empty response

Three checks for HTTP 200 with empty text

How to fix an invalid thinking signature

Signature failures in multi-turn chats

Long-form output practices

max_tokens, timeouts and resuming