migration-guide changedmodels/sonnet-5-5/migration-guide
Nearest release: v2.1.318, 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+9added
Lines−9removed
From line
26
where the diff opens
First seen
29 Sep 2026
this site's first read of the page
Recorded edits22to this page, all time
The whole hunk
from line 26, old and new numbered
/
from line 26
2626 ```bash cURL
2727 curl https://api.anthropic.com/v1/messages \
2828 -H "x-api-key: $ANTHROPIC_API_KEY" \
29 -H "anthropic-version: 2023-06-01" \
29 -H "anthropic-version: 2026-10-21" \
3030 -H "content-type: application/json" \
3131 -d '{
3232 "model": "claude-sonnet-5-5",
from line 249
249249 ```bash cURL
250250 curl https://api.anthropic.com/v1/messages \
251251 -H "x-api-key: $ANTHROPIC_API_KEY" \
252 -H "anthropic-version: 2023-06-01" \
252 -H "anthropic-version: 2026-10-21" \
253253 -H "content-type: application/json" \
254254 -d '{
255255 "model": "claude-sonnet-5",
from line 357
357357 ```bash cURL
358358 curl https://api.anthropic.com/v1/messages \
359359 -H "x-api-key: $ANTHROPIC_API_KEY" \
360 -H "anthropic-version: 2023-06-01" \
360 -H "anthropic-version: 2026-10-21" \
361361 -H "content-type: application/json" \
362362 -d '{
363363 "model": "claude-sonnet-5-5",
from line 527
527527 ```bash cURL
528528 curl https://api.anthropic.com/v1/messages \
529529 -H "x-api-key: $ANTHROPIC_API_KEY" \
530 -H "anthropic-version: 2023-06-01" \
530 -H "anthropic-version: 2026-10-21" \
531531 -H "content-type: application/json" \
532532 -d '{
533533 "model": "claude-sonnet-5",
from line 659
659659 # strict tool use: every call matches the tool's input_schema
660660 curl https://api.anthropic.com/v1/messages \
661661 -H "x-api-key: $ANTHROPIC_API_KEY" \
662 -H "anthropic-version: 2023-06-01" \
662 -H "anthropic-version: 2026-10-21" \
663663 -H "content-type: application/json" \
664664 -d '{
665665 "model": "claude-sonnet-5-5",
from line 905
905905 ```bash cURL
906906 curl https://api.anthropic.com/v1/messages \
907907 -H "x-api-key: $ANTHROPIC_API_KEY" \
908 -H "anthropic-version: 2023-06-01" \
908 -H "anthropic-version: 2026-10-21" \
909909 -H "content-type: application/json" \
910910 -d '{
911911 "model": "claude-sonnet-4-6",
from line 1037
10371037 ```bash cURL
10381038 curl https://api.anthropic.com/v1/messages \
10391039 -H "x-api-key: $ANTHROPIC_API_KEY" \
1040 -H "anthropic-version: 2023-06-01" \
1040 -H "anthropic-version: 2026-10-21" \
10411041 -H "content-type: application/json" \
10421042 -d '{
10431043 "model": "claude-sonnet-5-5",
from line 1222
12221222
12231223### Migrating from Claude Sonnet 4 or earlier
12241224
1225Claude Sonnet 4 is retired on the Claude API and still available on Amazon Bedrock and Claude Models on Google Cloud (Google managed). Claude 3.7 Sonnet is retired. From either model, first apply every preceding section, then these changes:
1225Claude Sonnet 4 is retired on the Claude API but available on Claude Models on Google Cloud (Google managed) and Amazon Bedrock. Claude 3.7 Sonnet is retired. From either model, first apply every preceding section, then these changes:
12261226
12271227* **Tool versions:** Use `text_editor_20250728`, with the tool name `str_replace_based_edit_tool` and no `undo_edit` command. Use `code_execution_20260521`. See the [text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) and the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#upgrade-to-latest-tool-version).
12281228* **Stop reasons:** Handle `refusal`. Claude 4.5 and later models also stop with `model_context_window_exceeded` at the context window limit. See [Handling stop reasons](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons).
12291229* **Trailing newlines:** Claude 4.5 and later models keep them in tool call string parameters.
1230* **Legacy beta headers:** Remove `token-efficient-tools-2025-02-19` and `output-128k-2025-02-19`.
1230* **Beta headers:** Remove `token-efficient-tools-2025-02-19` and `output-128k-2025-02-19`.
12311231* **Prompts:** Review them against [prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices).
12321232
12331233## Migrating to Claude Sonnet 5.5 from Claude Haiku 4.5
No line in this hunk matches that.