AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Oct 2, 2026, 22:00 JST

Claude Opus 5: code switch alone breaks on 7 points

Claude Opus 5: code switch alone breaks on 7 points

3 Key Points

  1. What happened

    A migration writeup lists seven breakages for code moved to claude-opus-5 or claude-sonnet-5, all in the official migration guide as of October 2026: 400 errors on temperature/top_p/top_k, fixed-budget budget_tokens thinking, and assistant prefill.

  2. Why it matters

    Those 400s and silent behavior changes make a one-line model swap unreliable, so teams running existing Claude API integrations are likely to see failed calls or truncated answers until they remove sampling parameters, move to adaptive thinking, and use structured outputs.

  3. What to watch

    Whether you hit the seventh item — Sonnet 5's new tokenizer making the same text about 1.3× more tokens — hinges on re-measuring with count_tokens before adjusting max_tokens or cost calculations, since pricing moved to $2/$10 from $3/$15.

WHO IT HITSEngineering and platform teams maintaining existing Claude API integrations, plus anyone responsible for prompt behavior and cost estimates, face code changes rather than a simple model-string swap.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The article frames this as a version-history problem rather than a single bad release. Sampling parameters, a fixed thinking budget, and assistant prefill were all accepted in earlier Claude models, and the guide now marks them as removed or discouraged. Correct fixes have also flipped back and forth across 4.7, 4.8, and Opus 5, which is why the author suggests starting by suspecting the sentences you added for the previous model rather than the model itself.

The behaviors that don't raise an error are subtler. Opus 5 keeps responses long even at lower effort, verifies its own answers, and delegates to subagents more often, so leftover instructions written for 4.8 — asking for more delegation or for final verification — can push it into over-verification. Sonnet 5 reads instructions literally, which makes carried-over style notes like "be concise" bite harder, and a "report only critical issues" instruction can lower code-review recall. The author also notes that moving to the top-tier Claude Fable 5.1 adds three more constraints around disabled thinking, tool_choice, and edited conversation history.

Taken together, the practical stakes for teams already running Claude in production lie in prompt hygiene and measurement discipline. Whether a migration goes smoothly appears to hinge on auditing inherited prompts and re-checking token counts with count_tokens before trusting old budget assumptions, since the pricing change and the tokenizer change pull costs in opposite directions.

FAQ
Which older parameters now return a 400 error?
Sampling parameters (temperature, top_p, top_k), a fixed budget_tokens thinking config, and assistant prefill all return 400 on Opus 5 and Sonnet 5.
Why does my output get cut off even though I changed nothing?
Opus 5 and Sonnet 5 run adaptive thinking when the thinking field is omitted, and max_tokens caps thinking plus body text together, so small limits end in stop_reason: "max_tokens".
Does Sonnet 5 cost more or less than before?
Pricing dropped to $2/$10 from $3/$15, but the new tokenizer turns the same text into about 1.3× more tokens, so costs can move in either direction.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleHao Global admits $160 million GPU smuggling to China