Claude Opus 5.5 and Sonnet 5.5 Migration Checklist: Breaking Changes, Exact 400 Errors and Before/After Code
Moving code from Claude Opus 5, Sonnet 5 or a 4.x model to Opus 5.5 (claude-opus-5-5) or Sonnet 5.5 (claude-sonnet-5-5) usually breaks in four places: disabled thinking or a manual budget_tokens, a tool_choice of any or tool, leftover sampling parameters such as temperature, and an assistant prefill at the end of messages. According to Anthropic's migration guides (read 2026-11-25), thinking is always on for Opus 5.5 and its default effort is medium, while Sonnet 5.5 replaces disabled with a new thinking: {"type": "between_tools"} setting. Both models also expect an append-only conversation; editing history invalidates thinking blocks and throws away your prompt cache.
QCode is an independent third-party API service. It is not affiliated with or endorsed by Anthropic. Parameters and error strings below are quoted from platform.claude.com, with the date we read them.
Updated 2026-11-26
Key facts
- Model IDs:
claude-opus-5-5(released 2026-09-22) andclaude-sonnet-5-5(released 2026-09-28). Both are fixed IDs with no date suffix. - Prices per million tokens (official, 2026-11-25): Opus 5.5 is $4 input / $20 output with $0.20 cache reads, cheaper than Opus 5 at $5 / $25. Sonnet 5.5 is $2 / $10 with $0.10 cache reads. QCode bills official price × 1.0; live rates are on /models.
- Thinking: Opus 5.5 cannot turn thinking off.
disabledandenabledwithbudget_tokensboth return 400. On Sonnet 5.5 the lowest setting isbetween_tools, which only works atlow,mediumorhigheffort. - Tool use: both models accept only
autoandnonefortool_choice. Usestrict: trueor structured outputs when you need schema-valid input. - Caching and thinking blocks: editing earlier messages,
systemortoolscan fail the thinking-block check and also kills cache hits. Change instructions with a mid-conversation system message. The minimum cacheable prompt drops to 512 tokens. - Default effort:
mediumon Opus 5.5 (Opus 5 usedhigh),highon Sonnet 5.5 via the API. Set it explicitly and re-baseline cost.
Which old patterns now fail
| Old pattern (Opus 5 / Sonnet 5 / 4.x) | Opus 5.5 | Sonnet 5.5 | Replace with |
|---|---|---|---|
thinking: {"type": "disabled"} |
400 | 400 (message points to between_tools) |
Opus: drop thinking, use effort. Sonnet: {"type": "between_tools"} |
thinking: {"type": "enabled", "budget_tokens": N} |
400 | 400 | {"type": "adaptive"} + output_config.effort |
tool_choice any or tool |
400 | 400 | auto + strict: true on tools |
temperature, top_p, top_k |
error | error | Remove; steer with the prompt |
| Assistant prefill as last turn | 400 | 400 | Structured outputs or system prompt |
output_format={...} |
400 without beta header | 400 without beta header | output_config.format |
computer_20251124 |
400 on the Claude API | move to the toolset | computer_toolset_20260801 |
If your only problem is the effort-versus-disabled-thinking conflict, we already have a focused page: effort not supported / thinking disabled. Fable 5.2 errors are covered in Claude Fable 5.2 API errors. This article is the full list of things to change in one pass when you move to the 5.5 models.
Step 1: change the model ID and check the price
model = "claude-opus-5" # before
model = "claude-opus-5-5" # after
model = "claude-sonnet-5-5" # or Sonnet 5.5
The 5.5 models have no dated snapshot suffix. Don't append -2026xxxx; you will get a model-not-found style error. Through QCode the IDs are the same as Anthropic's. The /models page (read 2026-11-22) lists claude-opus-5-5 at $4 / $20 and claude-sonnet-5-5 at $2 / $10.
Step 2: handle "thinking can't be disabled"
The two error messages, verbatim from Anthropic's migration guide:
"thinking.type.disabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.
"thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking behavior.
Opus 5.5: send no thinking field, or {"type": "adaptive"}, which is equivalent. To think less, lower the effort:
# Before: Opus 5 accepts disabled thinking
client.messages.create(
model="claude-opus-5",
max_tokens=16000,
thinking={"type": "disabled"},
messages=[{"role": "user", "content": "..."}],
)
# After: thinking is always on; effort controls depth and cost
client.messages.create(
model="claude-opus-5-5",
max_tokens=16000,
output_config={"effort": "low"},
messages=[{"role": "user", "content": "..."}],
)
Sonnet 5.5: sending disabled returns an error that tells you what to use instead:
To turn thinking off on this model, send "thinking": {"type": "between_tools"} instead of {"type": "disabled"}. The model does not think before responding. The short updates it writes between tool calls come back as thinking blocks.
client.messages.create(
model="claude-sonnet-5-5",
max_tokens=16000,
thinking={"type": "between_tools"},
output_config={"effort": "high"}, # between_tools accepts low / medium / high only
messages=[{"role": "user", "content": "..."}],
)
between_tools has three rules: it returns 400 at xhigh or max; it takes no other field (display, budget_tokens or block_binding cause a 400); and a per-message effort that differs from the level in effect is also rejected.
Revisit max_tokens. It covers thinking plus response text. Anthropic suggests starting at 64k for xhigh or max effort. A small max_tokens that worked with thinking off will now be eaten by thinking, and you will see stop_reason: "max_tokens".
Effort levels are low, medium, high, xhigh and max. Opus 5.5 defaults to medium; Sonnet 5.5 defaults to high on the API. The levels were recalibrated, so don't carry over a value tuned on an older model; rerun a sweep on your own evals. Our adaptive thinking and effort guide covers the cost side.
Step 3: replace forced tool use
The error (the token counting endpoint validates the same way):
tool_choice: type "tool" and "any" are not supported for this model.
# Before
client.messages.create(
model="claude-opus-5",
max_tokens=1024,
tools=tools,
tool_choice={"type": "tool", "name": "get_weather"},
messages=[{"role": "user", "content": "What is the weather in Paris?"}],
)
# After: auto + strict, and say in the prompt when the tool applies
client.messages.create(
model="claude-opus-5-5",
max_tokens=1024,
tools=[{**tool, "strict": True} for tool in tools],
tool_choice={"type": "auto"},
messages=[{"role": "user", "content": "What is the weather in Paris? Use the get_weather tool."}],
)
Limits to know: at most 20 strict tools per request; MCP, computer use and browser use toolset entries don't accept strict; every object in a strict schema needs additionalProperties: false. If you used "force one tool" only to extract JSON, structured outputs (output_config.format) is now the cleaner option.
Step 4: remove sampling parameters and prefills
- Delete
temperature,top_pandtop_k. This hits code coming from Opus 4.6 or earlier most often. - Don't end
messageswith an assistant prefill. Sonnet 5.5's message is:This model does not support assistant message prefill. The conversation must end with a user message. - If you prefilled
{to coax out JSON, switch to structured outputs. If you prefilled a preamble, move it into the system prompt.
Step 5: keep the conversation append-only to save thinking and cache
This one is easy to miss and shows up on the bill. Before Opus 5.5 reads one of its own thinking blocks, the API checks that nothing changed since that block was produced: the system prompt, the tools and every earlier message. Anthropic's guidance:
- Append only. Don't edit, reorder or drop earlier messages, and don't modify
thinkingblocks inside a tool-use loop. - Change instructions or tools with a mid-conversation system message, not by rewriting
systemortools. Anthropic notes that after a history rebuild a request can get a 400, and prompt cache hits are lost. QCode does not document whether it acceptsrole: systeminsidemessages; if you rely on this, test it with a small request first. - A failed check may or may not return a 400
thinking-block-conversation-mismatcherror. Sometimes blocks are just dropped.
Why it matters for cost: prompt caching matches on prefixes. Frameworks that rewrite the system prompt every turn, or put a timestamp in it, rewrite the cache on every request. Opus 5.5 cache reads are $0.20 per million tokens, 5% of the input price; a broken prefix means paying $5 per million again for a 5-minute cache write. The minimum cacheable prompt is now 512 tokens on Opus 5.5 and Sonnet 5.5, so short prompts that never cached before now can. Changing effort mid-session can also invalidate the cache, so keep thinking and effort settings stable within a session.
To add or change tools mid-session without losing the cache, see mid-conversation tool changes, which covers the inline-tools-2026-09-15 beta.
Switching models drops thinking blocks. Each block records the model that produced it. Move a conversation from Fable or Mythos to Opus 5.5 and the API drops the older blocks before the model sees them; the request still succeeds and the dropped blocks aren't billed. If a router or fallback can move conversations between models, expect the new model to run without the earlier reasoning.
Step 6: find the text between tool calls
On the 5.5 models, the short progress notes written between tool calls arrive in thinking blocks, not text blocks. At the default display: "omitted" they are empty, so progress UIs go quiet between tool calls with no error. The fix:
thinking = {"type": "adaptive", "display": "summarized"}
# or display: "updates" (beta, needs the thinking-display-updates-2026-08-18 header)
Also read content blocks by type, never by position such as content[0], because any response can start with a thinking block.
Step 7: the remaining one-line changes
- Structured outputs:
output_formatis deprecated and returns 400 without thestructured-outputs-2025-11-13header. Useoutput_config.format. - Computer use: on the Claude API,
computer_20251124returns'claude-opus-5-5' does not support tool types: computer_20251124.Declare{"type": "computer_toolset_20260801"}and drop the old beta header. - Refusals: a declined request returns HTTP 200 with
stop_reason: "refusal"and astop_detailsobject. - Context: the 1M window is the default; old context-window beta headers have no effect.
- Priority Tier: Anthropic says it is not supported on Opus 5.5, so plan capacity separately if you rely on it.
The full checklist (paste it into your PR)
- Set the model ID to
claude-opus-5-5orclaude-sonnet-5-5. - Remove
thinking: {"type": "disabled"}andbudget_tokens. Use effort on Opus; usebetween_toolson Sonnet if you want no up-front thinking. - Set
output_config.effortexplicitly and rerun your effort sweep. - Replace
tool_choiceany/toolwithautoplusstrict: true, or move to structured outputs. - Remove
temperature,top_p,top_kand assistant prefills. - Read content blocks by
type; passthinkingblocks back unchanged in tool loops. - If you render progress between tool calls, set
display: "summarized"or"updates". - Make the conversation append-only; send instruction changes as mid-conversation system messages.
- At
xhighormax, startmax_tokensaround 64k. - Move
output_formattooutput_config.format; move computer use tocomputer_toolset_20260801. - Handle
stop_reason: "refusal"and configure a fallback if you need one. - Compare cost and latency per task before and after the migration.
Calling the 5.5 models through QCode
With the SDK, change only the base URL and key. Parameters are written exactly as in Anthropic's docs:
import anthropic
client = anthropic.Anthropic(
base_url="https://api.qcode.cc/api",
api_key="cr_your_key",
)
resp = client.messages.create(
model="claude-opus-5-5",
max_tokens=8000,
output_config={"effort": "medium"},
messages=[{"role": "user", "content": "Review this migration diff"}],
)
for block in resp.content:
if block.type == "text":
print(block.text)
In Claude Code, set ANTHROPIC_BASE_URL=https://api.qcode.cc/api and ANTHROPIC_AUTH_TOKEN=cr_your_key; Claude Code sends the parameters for each model itself. Claude Code also exposes effort controls (/effort, --effort, CLAUDE_CODE_EFFORT_LEVEL, effortLevel in settings.json); check the current Claude Code documentation and your installed version before relying on them. Users in Asia can use asia.qcode.cc, and North America or Europe us.qcode.cc. Claude models are served only on the Anthropic-protocol endpoint, not on /openai/v1. QCode does not document which anthropic-beta headers or beta-only parameters (such as speed: fast) it forwards; if your code relies on one, test it with a small request first.
FAQ
Is thinking really impossible to turn off on Opus 5.5?
Yes. Anthropic's guide says thinking is always on for Opus 5.5, and both disabled and manual budget_tokens return 400. To cut latency and cost, lower output_config.effort to low or medium.
Is Sonnet 5.5's between_tools the same as the old disabled?
Close, but not identical. With between_tools the model doesn't think before responding, yet the short notes it writes between tool calls still come back as thinking blocks. It only works with low, medium or high effort and takes no other fields.
Why did my UI go silent between tool calls after migrating?
Text between tool calls now arrives in thinking blocks, and the default display: "omitted" returns them empty. Set thinking.display to "summarized", or "updates" in beta, and render the non-empty thinking blocks.
tool_choice any is gone. How do I make sure the model calls my tool?
Use auto and state clearly in the prompt when the tool applies. If you only need schema-valid JSON, structured outputs with output_config.format is more reliable than forcing a tool.
My cache hit rate dropped after migrating. Why?
Usually something rewrites the system prompt, tools or earlier messages each turn, or a timestamp sits in the prompt. The 5.5 models expect append-only history, so any prefix change rewrites the cache. Changing effort mid-session also invalidates it.
Is Opus 5.5 cheaper than Opus 5?
Per token, yes: $4 / $20 per million versus $5 / $25, with $0.20 cache reads on Opus 5.5. Thinking is always on, though, so measure tokens per task again before you compare total cost.
Do errors look different when I call through QCode?
The error strings above are quoted from Anthropic's migration guides (read 2026-11-25). QCode does not document whether it returns the upstream error body byte-for-byte, so do not match on the exact wording; if the text differs from what you see here, keep the full response body and contact QCode support.
Recommended plan
A migration means repeated eval runs and effort sweeps, so usage runs well above normal for a few weeks. The Daily-35 plan ($53.57 per 30 days, $35 of usage per day, billed at official price × 1.0) fits that steady development pace; see /pricing for current terms. For a quick trial run first, the packs on /pay-as-you-go need no subscription.