AI Coding

How to Migrate From Claude Sonnet 4.5 to Sonnet 5.5 Before the November 30 Retirement

Claude Sonnet 4.5 leaves the API on November 30, 2026. Sonnet 5.5 rejects prefill, thinking budgets and sampling settings, so here is the migration checklist.

Tyler Brennan

Runtime & Language Tooling Writer

Published 7 min read
A developer writes code on a laptop in front of multiple monitors in an office setting.
On this page 11 sections

To migrate from Claude Sonnet 4.5 to Sonnet 5.5, change the model ID to claude-sonnet-5-5, remove assistant prefill, thinking budgets and sampling parameters, and read response content by block type. Then set an effort level and recount tokens. Anthropic retires Sonnet 4.5 on the Claude API on November 30, 2026.

This guide is for developers whose apps, agents or internal coding tools still call the older model. It walks through the retirement date, the errors you will hit, and a rollout plan that keeps users safe. Backtrace covers AI coding tools for working engineers, and model retirements are now a routine part of that job.

What Is the Sonnet 4.5 Retirement Date?

According to Anthropic's model deprecations page, the company notified developers on September 30, 2026 that claude-sonnet-4-5-20250929 retires on November 30. Requests to a retired model fail. The recommended replacement is claude-sonnet-5-5.

That gives you roughly five weeks from today, which is tighter than it sounds when several teams share one account. Anthropic promises at least 60 days of notice for publicly released models, and the page lists a usage audit you can export from the Claude Console. The export breaks usage down by API key and model, which is the fastest way to find forgotten callers.

Other dates are worth noting. Claude Haiku 4.5 shows a tentative retirement of no sooner than October 15, 2026, and Opus 4.5 no sooner than November 24, 2026. Neither is formally deprecated, but check your own exposure.

A person creates a flowchart diagram with red pen on a whiteboard, detailing plans and budgeting.

Step 1: Find Every Caller

Start with an inventory. Model IDs hide in more places than most teams expect. They sit in environment files, infrastructure variables, notebooks, CI jobs and the config of internal agents.

Work through this list:

  1. Export usage from the Claude Console and sort it by model.
  2. Search every repository for claude-sonnet-4-5 and the dated ID.
  3. Check deploy configs, feature flag payloads and secrets stores for model names.
  4. Ask each team that owns a bot or script whether it pins a model.

Pay attention to Amazon Bedrock and Google Cloud users. Anthropic notes that partner-operated platforms set their own retirement schedules, so the dates may differ for you.

Step 2: Migrate to Sonnet 5.5 and Fix the Five Errors

The Sonnet 5.5 migration guide lists settings that return a 400 error. Several apply to code written for Sonnet 4.5. Fixing them before you change the model ID makes the swap a one-line pull request.

Here are the changes that matter most when coming from Sonnet 4.5:

Step 2: Migrate to Sonnet 5.5 and Fix the Five Errors
Old behaviorOn Sonnet 5.5What to do
Assistant prefill400 errorUse structured outputs, system prompt instructions or a user-turn reminder.
Thinking budget_tokens400 errorRemove the budget and set an effort level.
temperature, top_p, top_k400 errorRemove all three.
Forced tool choiceNot supportedUse auto with strict tools.
output_formatDeprecatedMove to output_config.format.

Prefill deserves the most attention. Many coding tools end a prompt with an opening brace or a code fence to force a format. Sonnet 5.5 rejects any request whose last turn is from the assistant. The guide suggests replacing it based on its purpose, with structured outputs for format and a plain instruction for preambles.

Step 3: Handle Thinking That Is Now On by Default

On Sonnet 4.5, a request with no thinking field ran without thinking. On Sonnet 5.5, the same request runs with adaptive thinking. That changes what comes back.

Three code changes follow, according to the guide. Read content blocks by type, because a response can start with a thinking block and code that reads the first block as text will break. Pass thinking blocks back unchanged in tool loops. Revisit max_tokens, since thinking tokens count as output tokens and are billed that way.

A female engineer works on code in a contemporary office setting, showcasing software development.

If you want to avoid up-front thinking, the guide says to send a thinking type of between_tools. The older disabled value returns a 400 error on this model. Thinking text is also omitted by default, so set display to summarized if your UI shows it.

How Much More Will It Cost?

Expect the same text to cost more tokens, though the price per token may not change. Sonnet 5.5 uses the Sonnet 5 tokenizer, which produces about 30 percent more tokens than Sonnet 4.5 for the same text, depending on content. Images can cost about 2.5 times as many tokens for a 2000 by 1500 picture. Recount with token counting and re-baseline your budget.

Prompt cache reads cost $0.10 per million tokens on Sonnet 5.5, which the guide says is half the Sonnet 5 rate. Teams with long, stable prompts, such as a coding agent that reloads the same repository context, may recover some of the added token cost through caching.

Step 4: Check the API Version Change Separately

Do not confuse the model move with a second change that landed this week. Anthropic published API version 2026-10-21, and the API version migration guide says it removes temperature, top_p and top_k entirely, returning a 400 error even at default values. Newer SDK major versions no longer include those parameters.

You can stage these changes. Move the model first on API version 2023-06-01, with sampling parameters already removed. Upgrade the SDK and API version later, as its own release. Keeping the two changes apart makes any regression easy to trace.

Close-up of a computer screen displaying an authentication failed message.

Step 5: Re-run Your Evaluations

A new model changes behavior even when the code runs. Prompts tuned for Sonnet 4.5 may produce longer answers, different tool-call patterns or different refusals. The guide recommends re-running your effort sweep, since there is no fixed mapping from a thinking budget to an effort level.

A practical test plan looks like this:

  1. Collect 50 to 200 real prompts from production logs, with sensitive data removed.
  2. Run them on both models at two or three effort levels.
  3. Compare correctness, latency, token use and cost per task.
  4. Review a sample by hand, especially tool calls and code edits.

Keep the comparison honest. Use the same prompts, the same tools and the same grading rubric on both models. If the new model scores better only because you tuned its prompt harder, you have measured your effort, not the model.

Our advice on prompting AI coding assistants still applies. Clear instructions in the user turn replace most of what prefill used to do.

Is It Safe to Switch All Traffic at Once?

No. Route a small share of traffic to Sonnet 5.5 first and watch error rates, cost and user feedback. A model ID is just a config value, so treat it like any risky rollout. Our guide to feature flag best practices explains how to ramp traffic and keep a fast rollback path. Keep that path open until the retirement date, then remove the old code.

Do Not Forget Agents and Editor Plugins

Application code is only part of the exposure. Internal coding agents, review bots and editor plugins often pin a model name in a config file that nobody has opened in months. A pinned bot that fails on December 1 will fail quietly, usually in a channel that few people watch.

List each automation that calls the API on your behalf. For each one, record the owner, the model it uses, and where the setting lives. A shared spreadsheet is enough. The point is that someone is named for every caller before the deadline.

Also check scheduled jobs. Nightly summaries, changelog generators and test-triage scripts run when nobody is looking. A failed request there may not page anyone, so add an alert for any request that returns an error from the model endpoint.

Handling Edge Cases

A few details trip people up late in the process. Tool call input escaping can differ, so parse input with a standard JSON parser and stop using string matching. Claude 4.5 and later models keep trailing newlines in tool string parameters. Remove beta headers such as interleaved-thinking-2025-05-14, which adaptive thinking makes unnecessary.

Team of developers working together on computers in a modern tech office.

Backtrace editors suggest one more habit. Put the model ID in a single config file, and record the date you last tested it. The same discipline helps with runtime upgrades, as in our Node.js 26 upgrade guide.

The guide also notes that Anthropic bundles a migration skill with Claude Code. Running it applies the model swap and parameter fixes across a codebase, then produces a checklist of items to verify by hand. Treat the output as a draft and review the diff like any other change.

Conclusion

Sonnet 4.5 is gone from the Claude API on November 30, so the real choice is whether you migrate calmly now or in a scramble later. Inventory your callers, remove prefill, budgets and sampling settings, handle thinking blocks, and recount tokens. Ramp traffic behind a flag, compare results on real prompts, and keep the rollback open until the date passes. Start with the usage export this week.

When does Claude Sonnet 4.5 retire on the Claude API?
Anthropic says claude-sonnet-4-5-20250929 retires on November 30, 2026, after a September 30 notice to developers. Requests to a retired model fail. The recommended replacement is claude-sonnet-5-5. Partner platforms such as Amazon Bedrock set their own schedules, so confirm the dates for the platform you use.
Why does Sonnet 5.5 return a 400 error on my old requests?
Sonnet 5.5 rejects several settings that Sonnet 4.5 accepted. These include a prefilled assistant turn, thinking with a token budget, sampling parameters like temperature, and forced tool choice. Remove or replace each one. The error message names the setting, so fix them one at a time.
Will my costs go up after moving to Sonnet 5.5?
Possibly. Sonnet 5.5 uses a newer tokenizer that produces about 30 percent more tokens for the same text, and large images can cost far more tokens. Prompt cache reads are cheaper, at $0.10 per million tokens. Recount with token counting and re-baseline your budget before you route all traffic.
Should I upgrade the API version at the same time?
Do it separately. API version 2026-10-21 removes temperature, top_p and top_k and changes some SDK types. Move the model first, with those parameters already removed, then upgrade the SDK and API version in a second release. Two small changes are much easier to debug than one large one.

Written by

Tyler Brennan

Runtime & Language Tooling Writer

11+ years experience

Tyler spent nine years as a full-stack engineer at a mid-sized e-commerce company, where he owned the Node.js services and the build pipeline behind them. He ran four major runtime upgrades there and still keeps the habit of reading changelogs for what gets removed before what gets added. At Backtrace he covers language releases, package managers and the local tooling that decides how fast a team moves. His rule is simple: an upgrade guide is only useful if it lists the failure you will see first and the command that finds it.

Credentials

  • B.S., Computer Science, University of Wisconsin-Madison
  • Former Senior Full-Stack Engineer, e-commerce platform (2014-2023)
  • OpenJS Foundation Node.js Application Developer certification