◉CLAUDE LABJP
●CC 2.1.332 — In 2.1.332 (11/25), skills from MCP servers show up in the / menu as server:skill (beta)●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 4 days left. Move to claude-sonnet-5-5●/SHIP — Users report a custom ship skill hidden behind the new built-in /ship command●NEW — New: Before Sonnet 4.5 retires, compare the 3 places its answers change●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models at their rates. 5 days left●JETBRAINS — Our guide to using Claude Code from JetBrains IDEs is the most-read page right now●CC 2.1.332 — In 2.1.332 (11/25), skills from MCP servers show up in the / menu as server:skill (beta)●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 4 days left. Move to claude-sonnet-5-5●/SHIP — Users report a custom ship skill hidden behind the new built-in /ship command●NEW — New: Before Sonnet 4.5 retires, compare the 3 places its answers change●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models at their rates. 5 days left●JETBRAINS — Our guide to using Claude Code from JetBrains IDEs is the most-read page right now
Articles/API & SDK
⬡ API & SDK/2026-11-25Intermediate

Five Days Before Sonnet 4.5 Retires: Compare the Three Things That Change Without an Error While the Old Model Still Answers

claude-sonnet-4-5 retires on November 30. Switch the ID to claude-sonnet-5-5 and nothing returns a 400, yet thinking now runs by default, max_tokens covers more than the answer, and stop_reason shifts. Here is a small script to run the same requests on both models before the old one stops answering, and how to read the differences.

Claude API149Model Deprecation3Sonnet 5.53stop_reason3max_tokens

On Monday night I pointed a small script — the one that tidies store announcements into several languages for my apps — at claude-sonnet-5-5, then ran the scanner I had written earlier to catch parameters that return a 400. It came back clean. I was about to close the terminal.

What stopped me was one line near the end of the migration guide: "Revisit max_tokens." I had checked whether anything errored. I had not once looked at whether the responses still looked the same.

The short version: getting rid of the 400s is the start of this migration, not the end. And you can only compare before and after while the old model still answers — that is, until November 30. That is what makes this deadline awkward.

The dates and the replacement ID

The official deprecations table lists claude-sonnet-4-5-20250929 as deprecated on September 30, 2026, with retirement on November 30, 2026. The same page says the retirement includes claude-sonnet-4-5, the undated alias. Calling the alias doesn't get you out of it.

The recommended replacement is claude-sonnet-5-5, which has no date suffix. I covered pricing and tokenizer differences, and the parameters that now return a 400, in two earlier pieces (checking the billing difference and a scanner for 400-causing arguments). This one is only about what changes while still returning 200.

Three things that change without a 400

I reread the official guide, "Migrating to Claude Sonnet 5.5," sorting each item into "errors" and "doesn't error." On the quiet side, three items mattered for my script.

What changesSonnet 4.5Sonnet 5.5Why it's easy to miss
A request with no thinking fieldRuns without thinkingRuns with adaptive thinking by defaultYou never set it, so it never shows up in a diff
Order of contentText comes firstA thinking block can come firstcontent[0].text is empty or throws
What max_tokens coversMostly the answerThinking plus the answerThe answer gets cut and stop_reason becomes max_tokens

On top of that, the guide says the same text produces about 30 percent more tokens than on Sonnet 4.5. Add the thinking, and the same max_tokens leaves far less room for the answer.

One more: Sonnet 5.5 declines in more categories. A decline comes back as stop_reason: "refusal", with a category such as cyber or general_harms in stop_details. The guide notes that benign work can also trigger general_harms.

Thinking text is omitted by default, too: thinking blocks arrive with an empty thinking field and a signature. If you used to log thinking, your log will simply go blank.

Read the answer by block type

First, get rid of anything that assumes content[0] is the answer. This function collects the text and records how the response ended, in one row.

# What it solves: don't lose the answer when a thinking block comes first,
# and record stop_reason and token use side by side.
def summarize(response):
    texts = []
    thinking_blocks = 0
    for block in response.content:
        if block.type == "text":
            texts.append(block.text)
        elif block.type == "thinking":
            thinking_blocks += 1  # by default the text is empty; only the signature is set
    body = "".join(texts)
    details = getattr(response, "stop_details", None)
    return {
        "model": response.model,
        "stop_reason": response.stop_reason,
        "stop_details": str(details) if details else "",
        "thinking_blocks": thinking_blocks,
        "output_tokens": response.usage.output_tokens,
        "body_chars": len(body),
        "body": body,
    }

output_tokens includes thinking. I keep the answer's character count next to it so that "more output, shorter answer" jumps out.

Run the same requests on both models while you still can

This is the deadline part. After November 30, the old model's column can never be filled in. Pick five to ten representative requests from your real traffic, send them to both models with the same settings, and keep the result as a CSV.

# What it solves: send identical requests to Sonnet 4.5 and 5.5 and compare how they end.
# The old model fails after retirement, so run this once before November 30.
import csv
import anthropic
 
client = anthropic.Anthropic()
MODELS = ["claude-sonnet-4-5-20250929", "claude-sonnet-5-5"]
MAX_TOKENS = 1024  # use the value your production code sends today
 
prompts = [line.strip() for line in open("prompts.txt", encoding="utf-8") if line.strip()]
 
with open("compare.csv", "w", newline="", encoding="utf-8") as f:
    writer = csv.writer(f)
    writer.writerow(["prompt_no", "model", "stop_reason", "stop_details",
                     "thinking_blocks", "output_tokens", "body_chars"])
    for i, prompt in enumerate(prompts, 1):
        for model in MODELS:
            try:
                r = client.messages.create(
                    model=model,
                    max_tokens=MAX_TOKENS,
                    messages=[{"role": "user", "content": prompt}],
                )
            except anthropic.APIStatusError as e:
                writer.writerow([i, model, f"HTTP {e.status_code}", "", "", "", ""])
                continue
            s = summarize(r)  # the function from the previous section
            writer.writerow([i, model, s["stop_reason"], s["stop_details"],
                             s["thinking_blocks"], s["output_tokens"], s["body_chars"]])

I deliberately leave out thinking and output_config. If your production code doesn't set them, the difference you need to see is the difference in that unset state. Add settings after you've looked.

When reading the CSV, I check three things on the 5.5 rows first: is stop_reason max_tokens, is body_chars clearly shorter than on 4.5, and is there any refusal?

What to do with each difference

What the CSV showsFirst thing to tryWatch out for
Stopped at max_tokens, with thinking blocksTurn off up-front thinking with thinking: {"type": "between_tools"}disabled returns a 400 on 5.5; between_tools only works at low to high effort
Stopped at max_tokens, no thinkingRaise max_tokensAllow for roughly 30 percent more tokens
Short answer, but end_turnSet output_config.effort explicitly and compare again4.5 had no effort; the API default is high
refusalLog the stop_details category and revisit the requestServer-side fallback retries only some categories

For my own script, translation drafts don't need thinking time, so I'm leaning toward adding between_tools and leaving max_tokens alone. For requests where I do want a bit of reasoning, like summarising, I keep thinking on and widen max_tokens instead. Splitting by request type inside the same script turned out to be the simpler answer.

One more thing: the old trick of continuing a truncated answer by prefilling the assistant turn returns a 400 on 5.5. To ask for a continuation, put the cut-off text in the user message and ask the model to carry on from there.

Find the hard-coded content[0]

Last, list every place that reads the answer from content[0]. As an indie developer I can tell you the small scripts are exactly where this hides, usually in one line.

# What it solves: list every place that assumes the first block is the answer
grep -rnE 'content\[0\]\.text|content\[0\]\["text"\]|\.content\[0\]' --include='*.py' --include='*.ts' --include='*.js' .

Replace each hit with a read-by-type approach like summarize above, then run the comparison again and check that body_chars lines up.

The line I'm drawing for this deadline

Where I went wrong at first was treating "no errors" as the pass mark. A 400 is the kind failure — it stops you. A 200 with different contents is far harder to catch.

Errors are where a migration starts; comparison runs until the day before retirement. I'd like to keep that order for the next model swap too.

If you can, write five of your everyday requests into prompts.txt and run the comparison once today. After November 30, the old model's column stays empty for good.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⬡ API & SDK2026-11-09
Does an Undated claude-sonnet-4-5 Escape the November 30 Retirement?
The retirement table lists only the dated Sonnet 4.5 ID. How I read the docs on the undated alias, found the lines that really send requests, chose between Sonnet 4.6 and 5.5, and sorted out the 400s after the swap.
⬡ API & SDK2026-10-08
Before Sonnet 4.5 retires, one script to find the arguments that will return a 400
claude-sonnet-4-5 retires on November 30. Swapping the model ID is not enough: budget_tokens, prefill, and tool_choice will fail. Here is a scanner built from the official migration guide, its real output, and the order I would fix things in.
⬡ API & SDK2026-11-18
Before Your Customers Pay Through Linked Billing: Reading a 402 or 403 to Find Whose Wallet Is Empty
Linked billing, released in beta on November 17, lets you choose who pays on every Claude API request through billing_policy. When a request billed to a customer comes back as a 402 or 403, here is how I work out which wallet is the cause, when to pay for it myself, and a small Python wrapper that keeps that decision in one place.