Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

migration-guide changedmodels/sonnet-5-5/migration-guide

Nearest release: v2.1.333, published 4 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+26added
Lines−40removed
From line 4 where the diff opens
First seen 29 Sep 2026 this site's first read of the page
Recorded edits31to this page, all time

The whole hunk

from line 4, old and new numbered
/
lines
from line 4
44description: Switch to Claude Sonnet 5.5 from earlier Sonnet models or Claude Haiku 4.5 with this migration guide. The guidance to enable Claude Sonnet 5.5 includes settings that return errors, thinking changes, and a checklist for each starting model.
55---
66 
7This guide lists the code changes for moving to Claude Sonnet 5.5 from Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5, Claude Sonnet 4, Claude 3.7 Sonnet, or Claude Haiku 4.5. Read the first two sections, then read down to the section for your current model. The [migration checklist](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#migration-checklist) lists every change by starting model.
7This guide lists the code changes for moving to Claude Sonnet 5.5 from Claude Sonnet 5, Claude Sonnet 4.6, Claude Sonnet 4.5, Claude Sonnet 4, Claude Sonnet 3.7, or Claude Haiku 4.5. Read the first two sections, then read down to the section for your current model. The [migration checklist](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#migration-checklist) lists every change by starting model.
88 
99<Note>
1010 This guide covers migrating [Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) code. If you use [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview), you usually change only your agent’s `model` field. The [Migrating between model versions](https://platform.claude.com/docs/en/managed-agents/migration#migrating-between-model-versions) section of the Managed Agents Migration page has the details.
from line 229
229229* **Pass `thinking` blocks back unchanged** in tool-use loops, including empty ones. See [Preserving thinking blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#preserving-thinking-blocks).
230230* **Revisit `max_tokens`.** It covers thinking plus text, so a response can stop with [`stop_reason: "max_tokens"`](https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#stopped-at-max-tokens) before any text. Thinking tokens are billed as output tokens. See [Cost control](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#cost-control).
231231 
232Thinking text is omitted by default. `thinking` blocks arrive with an empty `thinking` field and a `signature`. To get readable summaries, set `display: "summarized"`, the default on Claude Sonnet 4.6 and earlier models and on Claude Haiku 4.5. See [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
232The API omits thinking text by default. `thinking` blocks arrive with an empty `thinking` field and a `signature`. To get readable summaries, send `thinking: {"type": "adaptive", "display": "summarized"}`. See [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
233233 
234234### Turn off up-front thinking
235235 
236To turn off up-front thinking on Claude Sonnet 5.5, send `thinking: {"type": "between_tools"}`. It’s the lowest thinking setting. Its progress updates between tool calls still come back as `thinking` blocks with their summary text. Without tools, the response contains only text. Claude Sonnet 5 turns thinking off with `thinking: {"type": "disabled"}` instead, and earlier models run without thinking by default. On Claude Sonnet 5.5, `disabled` returns a 400 `invalid_request_error`:
236To turn off up-front thinking on Claude Sonnet 5.5, send `thinking: {"type": "between_tools"}`. It’s the lowest thinking setting. Progress updates between tool calls still come back as `thinking` blocks, with their summaries. Claude Sonnet 5 turns thinking off with `thinking: {"type": "disabled"}` instead, and earlier models run without thinking by default. On Claude Sonnet 5.5, `disabled` returns a 400 `invalid_request_error`:
237237 
238238```text wrap
239239To 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.
from line 461
461461 
462462## Migration checklist by starting model
463463 
464Work down the groups and stop after the one that names your model. On Claude Haiku 4.5, apply every group except “Claude Sonnet 4 or earlier,” ending with “Claude Haiku 4.5 only.”
464Work down the groups and stop after the one that names your model. If you are on Claude Sonnet 5, the first group is the whole list. On Claude Haiku 4.5, apply every group except “Claude Sonnet 4 or earlier,” ending with “Claude Haiku 4.5 only.”
465465 
466466### Every starting model
467467 
from line 468
468468* Change the model ID to `claude-sonnet-5-5`.
469469* [Read content blocks by `type`](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#thinking-in-responses), and pass `thinking` blocks back unchanged.
470470* To keep running without up-front thinking, send the [lowest thinking setting](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#turn-off-up-front-thinking) at `high` effort or below.
471* If your code ran without thinking, [revisit `max_tokens`](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#thinking-in-responses).
471472* Replace [forced tool use](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#forced-tool-use) with `auto` and strict tools.
472473* Keep conversations [append-only](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#thinking-blocks).
473* Move computer use to the [toolset](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#computer-use-toolset), without the `fine-grained-tool-streaming-2025-05-14` beta header. On Amazon Bedrock, `computer_20251124` also works.
474* Move to the [computer use toolset](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#computer-use-toolset) and replace any `fine-grained-tool-streaming-2025-05-14` beta header with `eager_input_streaming: true` on each user-defined tool that needs it. On Amazon Bedrock, `computer_20251124` also works.
474475* [Pair the advisor tool](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#advisor-tool) with a supported advisor, and expect encrypted advice.
475* Read [text between tool calls](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#text-between-tool-calls) from `thinking` blocks.
476* If you show [text between tool calls](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#text-between-tool-calls), set `display` unless you send `between_tools`, and read the longer notes’ summaries from `thinking` blocks.
476477* [Handle refusals](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#safety-classifiers-and-fallback), and configure fallback.
477478* [Re-run your effort sweep](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#recommended-changes), and re-baseline cost.
478479 
from line 484
483484* Remove `temperature`, `top_p`, and `top_k`.
484485* If you [show thinking text](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#thinking-in-responses), set `display: "summarized"`.
485486* [Recount tokens](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#other-changes-from-claude-sonnet-4-6), and re-budget image tokens.
487* If your code rescales point or bounding-box coordinates, [use Claude Sonnet 5.5’s long-edge and visual-token limits](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#rescale-coordinates-when-you-cannot-pre-resize). Other limits can make the coordinates wrong with no error.
486488 
487489### Claude Sonnet 4.5 or earlier
488490 
from line 492
490492* Parse tool call input with a standard JSON parser.
491493* Set `output_config.effort` explicitly.
492494* Remove any context-window beta header.
493* Remove `interleaved-thinking-2025-05-14`, and replace `fine-grained-tool-streaming-2025-05-14` with `eager_input_streaming`.
495* Remove `interleaved-thinking-2025-05-14`, and replace `fine-grained-tool-streaming-2025-05-14` with `eager_input_streaming: true` on each user-defined tool that needs it.
494496* Move `output_format` to `output_config.format`.
495497 
496498### Claude Sonnet 4 or earlier
from line 858
856858 
857859Integrations that use the toolset need no change. To move to the toolset, replace `computer_20251124` or `computer_20250124` with `computer_toolset_20260801`, and drop that version’s beta header. For the request and agent-loop changes, see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124).
858860 
859If you send the `fine-grained-tool-streaming-2025-05-14` beta header, remove it when you move to the toolset. Alongside a toolset entry, it returns a 400 error. Set `eager_input_streaming: true` on each tool that needs it instead.
861If you send the `fine-grained-tool-streaming-2025-05-14` beta header, remove it when you move to the toolset. A request that sends it with a toolset entry returns a 400 error. Set `eager_input_streaming: true` on each user-defined tool that needs it instead.
860862 
861863### The advisor tool accepts fewer advisors
862864 
from line 868
866868 
867869On Claude Sonnet 5.5, notes longer than a sentence or two that the model writes between tool calls come back as [progress-update `thinking` blocks](https://platform.claude.com/docs/en/build-with-claude/thinking#progress-updates), empty at the default `display`. Shorter remarks stay `text`. On Claude Sonnet 5 and earlier models, all text between tool calls comes back as `text` blocks. No request fails, but an interface that shows those notes stops showing them.
868870 
869With adaptive thinking, set `display` to `"updates"` (beta, `thinking-display-updates-2026-08-18` header) to get the updates alone, or to `"summarized"` to get them mixed with reasoning. Render each non-empty `thinking` block before the `tool_use` block that follows it. With [`between_tools`](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#turn-off-up-front-thinking), the text comes back without `display`. See [User-facing progress updates](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5#user-facing-progress-updates).
871With adaptive thinking, set `display` to `"updates"` to get the updates’ summaries alone or to `"summarized"` to get them mixed with reasoning. The `"updates"` value is in beta and needs the `thinking-display-updates-2026-08-18` beta header. Render each non-empty `thinking` block before the `tool_use` block that follows it. With [`between_tools`](https://platform.claude.com/docs/en/models/sonnet-5-5/migration-guide#turn-off-up-front-thinking), you get the summaries without `display`. See [User-facing progress updates](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5#user-facing-progress-updates).
870872 
871873### Safety classifiers and fallback
872874 
from line 934
932934 ```
933935 
934936 ```bash CLI
935 ant messages create <<'YAML'
936 model: claude-sonnet-4-6
937 max_tokens: 16000
938 thinking:
939 type: enabled
940 budget_tokens: 10000
941 messages:
942 - role: user
943 content: "..."
944 YAML
937 ant messages create \
938 --model claude-sonnet-4-6 \
939 --max-tokens 16000 \
940 --thinking '{type: enabled, budget_tokens: 10000}' \
941 --message '{role: user, content: "..."}'
945942 ```
946943 
947944 ```python Python
from line 960
963960 ```
964961 
965962 ```csharp C#
966 using Anthropic;
967 using Anthropic.Models.Messages;
968 
969963 AnthropicClient client = new();
970964 
971965 var parameters = new MessageCreateParams
from line 1060
10661060 ```
10671061 
10681062 ```bash CLI
1069 ant messages create <<'YAML'
1070 model: claude-sonnet-5-5
1071 max_tokens: 16000
1072 thinking:
1073 type: adaptive
1074 output_config:
1075 effort: high
1076 messages:
1077 - role: user
1078 content: "..."
1079 YAML
1063 ant messages create \
1064 --model claude-sonnet-5-5 \
1065 --max-tokens 16000 \
1066 --thinking '{type: adaptive}' \
1067 --output-config '{effort: high}' \
1068 --message '{role: user, content: "..."}'
10801069 ```
10811070 
10821071 ```python Python
from line 1089
11001089 ```
11011090 
11021091 ```csharp C#
1103 using Anthropic;
1104 using Anthropic.Models.Messages;
1105 
11061092 AnthropicClient client = new();
11071093 
11081094 var parameters = new MessageCreateParams
from line 1186
12001186 
12011187### Migrating from Claude Sonnet 4.5 or earlier
12021188 
1203On Claude Sonnet 4.5, Claude Sonnet 4, or Claude 3.7 Sonnet, first apply every preceding section, then these changes.
1189On Claude Sonnet 4.5, Claude Sonnet 4, or Claude Sonnet 3.7, first apply every preceding section, then these changes.
12041190 
12051191**Prefill returns an error.** Claude Sonnet 5.5 rejects a prefilled last assistant turn with a 400 error, as Claude Sonnet 4.6 and Claude Sonnet 5 do. Claude Sonnet 4.5, Claude Haiku 4.5, and older models accept one. The error reads:
12061192 
from line 1212
12261212 
12271213**Context and output.** Claude Sonnet 5.5 has a larger context window and a higher output limit. See the [Claude Sonnet 5.5](https://platform.claude.com/docs/en/models/sonnet-5-5/overview) model page. Remove any context-window beta header.
12281214 
1229**Beta headers.** Remove `interleaved-thinking-2025-05-14`, because adaptive thinking interleaves automatically. Replace `fine-grained-tool-streaming-2025-05-14` with `eager_input_streaming: true` on each tool that needs it. That header returns a 400 error alongside a computer use or browser use toolset entry. See [Fine-grained tool streaming](https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming).
1215**Beta headers.** Remove `interleaved-thinking-2025-05-14`, because adaptive thinking interleaves automatically. Replace `fine-grained-tool-streaming-2025-05-14` with `eager_input_streaming: true` on each user-defined tool that needs it. A request that sends that header with a computer use or browser use toolset entry returns a 400 error. See [Fine-grained tool streaming](https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming).
12301216 
1231**Structured outputs.** The `output_format` parameter is deprecated. To use it anyway, add the `structured-outputs-2025-11-13` beta header. Without it, the API returns a 400 error. Use `output_config.format` instead.
1217**Structured outputs.** Move `output_format` to [`output_config.format`](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#migrating-from-the-beta). The `output_format` parameter is deprecated. A request that sends it without the `structured-outputs-2025-11-13` beta header returns a 400 error.
12321218 
12331219### Migrating from Claude Sonnet 4 or earlier
12341220 
Feedback