Claude Opus 4.5 retires on 22 January 2027: find the calls in your vibe-coded app and move to Claude Opus 5.5 without new 400 errors

Claude Opus 4.5 launched in November 2025 at a third of the old Opus price, so plenty of AI-built apps and agents hard-coded `claude-opus-4-5` for their hardest jobs: code review bots, long-document analysis, agent loops. Anthropic retires it on the Claude API on 22 January 2027, and after that every request to it fails. Anthropic recommends Claude Opus 5.5, which is cheaper per token, but it's a bigger jump than the name suggests: it skips three Opus generations of API changes, thinking can't be turned off, and five settings that Opus 4.5 code often sends return a 400 error. Here's how to find the calls, what to change, what it costs, and which platforms follow other dates.

Short answer

On the Claude API (also Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed) and Microsoft Foundry), claude-opus-4-5-20251101 and its alias claude-opus-4-5 retire on 22 January 2027. Anthropic announced it on 23 November 2026. After the date the Messages API returns 404 not_found_error. The recommended replacement is claude-opus-5-5 ($4 / $20 per million input/output tokens vs $5 / $25). Before you switch: remove temperature, top_p and top_k; remove assistant prefill; remove thinking (both enabled with budget_tokens and disabled return 400, because thinking is always on) and set output_config.effort instead; replace tool_choice any/tool with auto plus strict tools or structured outputs; read the reply by block type instead of content[0].text; and leave more room in max_tokens. The newer tokenizer can use up to about 35% more tokens for the same text, and thinking is billed as output, so compare real usage. claude-opus-4-6 is not a useful stopgap (retirement not sooner than 5 Feb 2027); claude-opus-4-8 (not sooner than 28 May 2027, same price as 4.5) still lets you run without thinking and force a tool. Lovable's built-in AI doesn't offer Opus 4.5; Replit AI Integrations still lists it.

What retires, when, and where

Anthropic's release notes of 23 November 2026 announced the deprecation of Claude Opus 4.5, with retirement on the Claude API on 22 January 2027. That's 60 days, the minimum notice Anthropic promises for publicly released models. The retirement covers the dated ID claude-opus-4-5-20251101 and the alias claude-opus-4-5. Anthropic's deprecation page says requests to a retired model fail, and on the Claude API the Messages API returns a 404 not_found_error.

Anthropic's dates apply to the platforms it operates: the Claude API, Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed) and Microsoft Foundry. Amazon Bedrock and Claude Models on Google Cloud (Google managed) set their own retirement schedules. Anthropic's Opus 4.5 model page lists Opus 4.5 on Bedrock's bedrock-runtime endpoint and on Google-managed Vertex, so check AWS's and Google's pages if you call it there.

Claude Opus models and their lifecycle, per Anthropic's model deprecations page and model pages (checked 4 Dec 2026)
ModelAPI model IDStatusRetirement
Claude Opus 4.5 claude-opus-4-5-20251101 (alias claude-opus-4-5) Deprecated (23 Nov 2026) 22 Jan 2027; requests fail with 404 not_found_error
Claude Opus 4.6 claude-opus-4-6 Active (legacy) Not sooner than 5 Feb 2027
Claude Opus 4.7 claude-opus-4-7 Active Not sooner than 16 Apr 2027
Claude Opus 4.8 claude-opus-4-8 Active (legacy) Not sooner than 28 May 2027
Claude Opus 5 claude-opus-5 Active Not sooner than 24 Jul 2027
Claude Opus 5.5 (recommended replacement) claude-opus-5-5 Active, latest Opus Not sooner than 22 Sep 2027

Anthropic doesn't publish a time of day for the retirement. Treat 22 January as the deadline and plan the switch, with testing, well before it.

Is my app affected? Find the model ID

You're affected if your app or agent calls the Anthropic API with your own API key and asks for an Opus 4.5 model ID. In AI-built apps that call usually sits in server-side code: a Supabase Edge Function, a Next.js or Express API route, a Cloudflare Worker, a GitHub Action that reviews pull requests, or an automation. The model name can also sit in an environment variable such as ANTHROPIC_MODEL, or in a gateway-style ID such as anthropic/claude-opus-4.5.

You're not affected by this date if you only use Claude inside a coding tool such as Claude Code or Grok Build (formerly Cursor), unless you pinned an Opus 4.5 model ID in its settings or config. Lovable apps using Lovable's built-in AI aren't affected either: see the platform section below.

  • Search the code with the commands below. They also catch dotted IDs and older Claude IDs that are already retired.
  • Check environment variables and secrets on your host and in Supabase (Edge Function secrets) for a variable that holds the model name. Secrets dashboards often hide values, so check what your code reads.
  • Check usage: in the Claude Console go to Usage → Export. Anthropic's deprecation page recommends this CSV to see usage broken down by API key and model.
  • Check your inbox: Anthropic says it emails customers with active deployments of a model that is about to retire on the Claude API. If you use a cloud platform, Anthropic says to check that platform's dates instead of relying on the email.
Find old Claude model IDs in your project (run in the repo root)
# ripgrep (rg) or grep both work
rg -n "claude-opus-4[-.]5|claude-(sonnet|opus|haiku)-4[-.][015]|claude-3" .
grep -rnE "claude-opus-4[-.]5|claude-(sonnet|opus|haiku)-4[-.][015]|claude-3" --exclude-dir=node_modules .

Switch to Claude Opus 5.5 without new 400 errors

Changing the model string is only the first item on Anthropic's checklist. Coming from Opus 4.5, the Opus 5.5 migration guide tells you to work through every change since Opus 4.5: the ones that took effect in Opus 4.6 and Opus 4.7, plus the ones every starting model needs. These are the changes that most often break AI-generated code.

Opus 4.5 → Opus 5.5 changes, per Anthropic's Claude Opus 5.5 migration guide (checked 4 Dec 2026)
If your code…On Opus 5.5Change it to
Sends temperature, top_p or top_k 400 error Remove them; steer output with the prompt
Ends messages with an assistant turn (prefill, for example { to force JSON) 400 error (already the case since Opus 4.6) Structured outputs (output_config.format) for JSON, or put the instruction in the system prompt
Sends thinking: {type: "enabled", budget_tokens: N} 400: "thinking.type.enabled" is not supported for this model. Remove thinking (or send {type: "adaptive"}) and set output_config.effort
Sends thinking: {type: "disabled"} 400: "thinking.type.disabled" is not supported for this model. Remove it and pick a lower effort where you wanted fewer tokens; thinking can't be turned off on Opus 5.5
Forces a tool with tool_choice any or tool 400: tool_choice: type "tool" and "any" are not supported for this model. tool_choice: {type: "auto"} with strict: true on the tool or structured outputs, and say in the prompt when to use it
Sends no effort (Opus 4.5 defaulted to high) Runs at medium, with thinking Set output_config.effort explicitly (low, medium, high, xhigh or max) and test two or three levels
Reads the answer as content[0].text Breaks: responses can start with thinking blocks Pick blocks where type is text
Runs a tool-use loop and rebuilds or filters the assistant message 400 if thinking blocks are edited, reordered or dropped Pass the assistant message back exactly as received, including empty thinking blocks
Uses a tight max_tokens Thinking counts toward max_tokens and is billed as output Raise max_tokens; Anthropic suggests starting at 64k for xhigh or max effort
Calls client.beta.messages.create() with beta headers effort-2025-11-24, interleaved-thinking-2025-05-14 or fine-grained-tool-streaming-2025-05-14 Not needed Use client.messages.create(), drop the first two headers, and set eager_input_streaming: true on tools instead of the third
Sends output_format for structured outputs 400 without the structured-outputs-2025-11-13 beta header output_config: {format: {...}}
Parses tool call input as a raw string JSON escaping can differ (since Opus 4.6) Use a standard JSON parser (JSON.parse, json.loads)

Two behaviour changes don't throw errors but can surprise you. Since Opus 4.7, Anthropic applies real-time cybersecurity safeguards, so some requests on security topics can end with stop_reason: "refusal"; handle that stop reason, and read stop_details for the category. Since Opus 4.7, images are processed at higher resolution, and a full-resolution image can use up to about 3 times as many image tokens; downsample if you don't need the detail. If you use Claude Code, Anthropic's guide suggests running /claude-api migrate this project to claude-opus-5-5, or /claude-api list what breaks moving to claude-opus-5-5. Don't edit code. first. Review whatever it changes.

Before and after: a typical AI-built call

A common pattern in AI-generated backends is an Opus call that forces a tool to get structured data back, with temperature: 0 and content[0] to read the result. The after version follows Anthropic's migration and structured outputs guides. Keep your own prompt, schema and error handling; this only shows the fields that change.

Supabase Edge Function or API route (TypeScript, @anthropic-ai/sdk)
// BEFORE (Opus 4.5): fails with 404 after 22 Jan 2027
const msg = await anthropic.messages.create({
  model: "claude-opus-4-5",
  max_tokens: 4096,
  temperature: 0,
  tools: [extractTool],
  tool_choice: { type: "tool", name: "extract" },
  messages: [{ role: "user", content: prompt }],
});
const data = msg.content[0].input;

// AFTER (Opus 5.5): structured outputs instead of a forced tool
const msg = await anthropic.messages.create({
  model: "claude-opus-5-5",
  max_tokens: 16000, // thinking + answer
  output_config: {
    effort: "medium",
    format: { type: "json_schema", schema: extractSchema },
  },
  messages: [{ role: "user", content: prompt }],
});
const text = msg.content
  .filter((b) => b.type === "text")
  .map((b) => b.text)
  .join("");
const data = JSON.parse(text);

extractSchema is the JSON schema your forced tool used as input_schema. Structured outputs support a subset of JSON Schema, and Anthropic's examples set additionalProperties: false on every object, so check the schema against the structured outputs guide (its SDK helpers such as zodOutputFormat() transform schemas for you). If TypeScript doesn't know output_config, upgrade the SDK. Anthropic's API-version guide says @anthropic-ai/sdk 1.0.0 and Python anthropic 2.0.0 are the first versions that send API version 2026-10-21, which rejects temperature, top_p and top_k for every model, so remove them in the same change.

Stopgap: Claude Opus 4.8, not 4.6

If you can't test the full move before 22 January, pick the stopgap by its retirement date. claude-opus-4-6 is listed as retiring not sooner than 5 February 2027, only two weeks later, and with 60 days' notice that date can arrive soon. claude-opus-4-8 is Active (legacy) with retirement not sooner than 28 May 2027, costs the same as Opus 4.5 ($5 / $25), and per Anthropic's Opus 5.5 guide it still runs without thinking when a request has no thinking field. Anthropic's pricing page also lists tool-use token counts for forced tool choice (any, tool) on Opus 4.8, so forced tools still work there.

The catch: Opus 4.8 already has most of the breaking changes. Prefill returns 400 (since Opus 4.6), thinking budgets return 400 (since Opus 4.7), non-default temperature/top_p/top_k return 400 on Claude 4.7 and later models, and it uses the newer tokenizer. Our take: if you have to remove those anyway, the remaining step to Opus 5.5 (effort instead of disabled thinking, auto tool choice, reading blocks by type) is small, and 5.5 is cheaper. Use 4.8 only to buy time.

What it costs after the switch

Claude API list prices per million tokens, per Anthropic's pricing page and model pages (checked 4 Dec 2026)
ModelInputOutputCache readContext / max output
Claude Opus 4.5 (retiring) $5 $25 $0.50 200K / 64K
Claude Opus 4.6 $5 $25 $0.50 1M / 128K
Claude Opus 4.8 $5 $25 $0.50 1M / 128K
Claude Opus 5.5 $4 $20 $0.20 1M / 128K
Claude Sonnet 5.5 (cheaper alternative) $2 $10 $0.10 1M / 128K

Per-token prices drop with Opus 5.5, but two things push the other way. Anthropic says the tokenizer introduced in Opus 4.7 can use roughly 1 to 1.35 times as many tokens for the same text, and Opus 5.5 always thinks, with thinking tokens billed as output even when the text isn't returned. Our arithmetic with Anthropic's figures: input that cost $5 on Opus 4.5 comes to between $4 and about $5.40 on Opus 5.5 (1.35 × $4), and output text between $20 and about $27 instead of $25, before any thinking tokens. Lower effort reduces thinking. Batch requests are 50% off on both. Compare a day of real usage in the Console after switching.

If the Opus call was a summariser or classifier rather than hard reasoning, test Claude Sonnet 5.5 too: Anthropic's pricing page lists it at half the Opus 5.5 price ($2 / $10). It's a different model with its own migration notes, covered in our Sonnet 4.5 retirement guide.

Lovable, Replit and other platforms

Lovable: apps that use Lovable's built-in AI connector aren't affected. Lovable's docs list Claude Fable 5.1, Opus 5.5, Opus 5, Sonnet 5.5, Sonnet 5 and Haiku 5.5 for newer apps, and its deprecated-models page lists no Opus model (checked 4 Dec 2026). If your Lovable app calls Anthropic from a Supabase Edge Function with your own key, the 22 January Claude API date applies.

Replit: Replit AI Integrations, which bills Claude calls to your Replit credits without an Anthropic key, still lists claude-opus-4-5 (and the already retired claude-opus-4-1 and claude-sonnet-4-5) on its model list, last updated 2 October 2026 according to the page. Replit says the list refreshes on a bi-weekly cadence and availability can change between refreshes. Replit hasn't published what happens to Opus 4.5 requests after 22 January, so move to a current model rather than waiting.

Gateways and clouds: Amazon Bedrock and Google-managed Vertex follow their own schedules. Gateways such as Vercel AI Gateway, Cloudflare AI Gateway and OpenRouter pass requests to providers; we haven't checked how each handles the retired ID, so check your gateway's model list.

Test the new model before you deploy

Send one request with the new model ID before you change production. This request follows Anthropic's Opus 5.5 migration guide; set ANTHROPIC_API_KEY in your terminal first. A 200 response with a text block (after a thinking block) means the ID and settings are accepted. Then deploy the function (for Supabase: supabase functions deploy <name>) and run the feature once in the live app, watching your logs for 400 errors.

Terminal
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2026-10-21" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-opus-5-5",
    "max_tokens": 4096,
    "messages": [{"role": "user", "content": "Say hello"}],
    "output_config": {"effort": "medium"}
  }'

Confirmed vs not published

What the vendors have and haven't documented (checked 4 Dec 2026)
QuestionStatus
Opus 4.5 retires on the Claude API on 22 Jan 2027, dated ID and alias Confirmed (Anthropic model deprecations page, Opus 4.5 model page, release notes of 23 Nov 2026)
Retired models return 404 not_found_error on the Claude API Confirmed (Anthropic model deprecations page)
Recommended replacement is claude-opus-5-5 Confirmed (Anthropic)
The settings that return 400 on Opus 5.5, and the changes from Opus 4.5 Confirmed (Anthropic Opus 5.5 migration guide)
Prices, context windows and default effort levels Confirmed (Anthropic pricing page and model pages)
Lovable's built-in AI doesn't offer Opus 4.5 Confirmed (Lovable AI features and deprecated-models pages)
Replit AI Integrations still lists claude-opus-4-5 Confirmed on Replit's docs page (last updated 2 Oct 2026); what Replit does after 22 Jan is not published
Time of day of the Claude API retirement Not published
Opus 4.5 retirement dates on Amazon Bedrock and Google-managed Vertex Set by AWS and Google; not checked here
How third-party gateways handle the retired ID Not checked; see your gateway's model list
Exact cost change for your app Depends on your prompts, effort and thinking; our range is arithmetic on Anthropic's figures

Common questions

When does Claude Opus 4.5 stop working?

On the Claude API (and Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed) and Microsoft Foundry) Claude Opus 4.5 retires on 22 January 2027. Both claude-opus-4-5-20251101 and the alias claude-opus-4-5 are included. Anthropic doesn't publish a time of day.

What error do I get after Claude Opus 4.5 is retired?

The Messages API returns HTTP 404 with a not_found_error. In an app that usually shows up as a generic error from the AI feature, and a 404 in your Edge Function or server logs.

Can I just replace claude-opus-4-5 with claude-opus-5-5?

Only if your request sends none of the settings Opus 5.5 rejects. Remove temperature, top_p and top_k, assistant prefill, any thinking setting other than adaptive, and forced tool_choice, set an effort level, and read text blocks by type. Otherwise the 404 becomes a 400.

Can I turn thinking off on Claude Opus 5.5?

No. Anthropic's migration guide says adaptive thinking is always on and thinking type disabled returns a 400 error. Use a lower effort level, such as low, where you want fewer thinking tokens.

Is Claude Opus 5.5 cheaper than Opus 4.5?

Per token, yes: $4 input and $20 output per million tokens vs $5 and $25. But the newer tokenizer can use up to about 35% more tokens for the same text, and thinking is billed as output, so measure real usage after switching.

Is Claude Opus 4.6 a good temporary replacement?

Not really. Anthropic lists its retirement as not sooner than 5 February 2027, two weeks after Opus 4.5. Claude Opus 4.8 (not sooner than 28 May 2027) is the safer stopgap, but plan the move to Opus 5.5.

Does this affect my Lovable or Replit app?

Lovable's built-in AI doesn't offer Opus 4.5, so it isn't affected. Replit AI Integrations still lists claude-opus-4-5, and Replit hasn't said what happens after 22 January. Apps calling Anthropic with your own key follow the Claude API date.

Related on VibeLiftoff