IntentiAI

Retired or soon-retired model

A call names a model its provider has retired, or will retire within 90 days.

Rule model-deprecatedCost audit

Why it costs money

Providers retire models on a published date. After it, a request that names the model is rejected with an error, so the feature behind that call stops working the same day, even though nothing in your code changed.

Retirements are announced by email and on a deprecations page that is easy to miss. The model name usually sits in one line of code that nobody has looked at since it was written, so the first sign is often an outage report from a user.

Switching in a hurry is also when cost controls slip: the replacement can have a different price, output limit or default behavior, and there is no time to test it.

Example

Flagged

import Anthropic from "@anthropic-ai/sdk";

const anthropic = new Anthropic();

export async function summarize(text: string) {
  const res = await anthropic.messages.create({
    model: "claude-3-7-sonnet-20250219",
    max_tokens: 400,
    messages: [{ role: "user", content: `Summarize:\n\n${text}` }],
  });
  return res.content[0].type === "text" ? res.content[0].text : "";
}

Fixed

import Anthropic from "@anthropic-ai/sdk";

const anthropic = new Anthropic();
// One setting for the model, so the next retirement is a config change.
const SUMMARY_MODEL = process.env.SUMMARY_MODEL ?? "claude-sonnet-5";

export async function summarize(text: string) {
  const res = await anthropic.messages.create({
    model: SUMMARY_MODEL,
    max_tokens: 400,
    messages: [{ role: "user", content: `Summarize:\n\n${text}` }],
  });
  return res.content[0].type === "text" ? res.content[0].text : "";
}

How to fix it

Switch to the replacement the finding names, or another current model from the same provider, and run the feature on a few real inputs before shipping. Check the new model's price and output limit while you are there.

Keep the model name in one setting rather than in each call, and check the provider's deprecations page when you update dependencies, so the next retirement is a one-line change made ahead of time.

What the audit detects

  • Calls whose model name can be read from the source and resolves, provider prefixes and snapshot dates included, to a model with a retirement date. For Claude only retirements Anthropic has announced count (its deprecations page), never the earliest possible dates it lists for active models; Claude through Amazon Bedrock or Google Cloud is not flagged, since they set their own schedules. Other providers use the price table dates, which match their deprecation pages.
  • Retired (the date has passed): marked Fix now, with no dollar figure, because calls to it fail and cost is not the issue. Other issues on that call are priced at the replacement the provider recommends, since that is what the call will cost once fixed, and the report says so. Retiring within 90 days: marked Fix soon, with the number of days left; the call keeps its own price.
  • One finding per model per file. The replacement named in the fix is the provider's own recommendation when it gives one, otherwise the newest model of the same provider and family in the table that is not itself retiring within 90 days; when there is none, no replacement is named. Test files are skipped, and models whose name is not written in the source are not checked.
Retired or soon-retired model: LLM cost rule | IntentiAI