New in 2.4: Test runs you can trust See what's new →

AI API shutdowns from 30 November to 20 January: the calendar, and a CI check that warns you first

Share

Between 30 November 2026 and 20 January 2027, Anthropic and OpenAI switch off six batches of models and endpoints. Any code that still calls one of them will get an error on the day, not a warning. Most teams will hear about the retirement from an email that goes to whoever owns the billing account. That person usually doesn't know which services use which model.

This post lists every date in that window, with the replacement each provider suggests. Then it gives you two small checks to run in CI. One fails the build when your code names a model that shuts down soon. The other catches Claude request bodies that Sonnet 5.5 will reject, because changing the model name isn't the whole migration.

The calendar

These dates come from Anthropic's model deprecations page and OpenAI's deprecations page, both read on 13 November 2026.

DateWhat shuts downSuggested replacement
30 Nov 2026claude-sonnet-4-5-20250929 (Claude API)claude-sonnet-5-5
30 Nov 2026OpenAI Agent Builder, the Evals dashboard and API, /v1/promptsAgents SDK, Promptfoo, prompts kept in your own code
1 Dec 2026gpt-image-1-mini, gpt-image-1.5, chatgpt-image-latestgpt-image-2.6-sunburst or -flare
11 Dec 2026gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-pro, o3, o3-progpt-6.1-sol, gpt-6.1-terra, gpt-6-luna
6 Jan 2027tts-1, tts-1-hd, gpt-4o-mini-tts; no new fine-tuning jobsgpt-realtime-2.1-mini
14 Jan 2027gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-minigpt-6-luna
20 Jan 2027gpt-realtime, gpt-audio and their mini and 4o variantsgpt-realtime-2.1, gpt-audio-1.5

A few details that are easy to miss:

  • Anthropic calls 30 November a tentative date. Plan for it anyway. Dates get pushed back more often than forward, but you can't count on that.
  • The Sonnet 4.5 date is for the Claude API. Amazon Bedrock and Google Cloud set their own schedules for the same model, so check those separately if you call it there.
  • OpenAI's Evals went read-only on 31 October. If a nightly job still creates eval runs, it's already failing. Look at its logs before you assume you have until the 30th.
  • The 11 December batch covers gpt-5, which many teams picked as the safe default only a year ago. gpt-5-pro and o3-pro become gpt-6.1-sol with reasoning.mode: proin the Responses API, so that's a parameter change as well as a rename.

Step 1: find out who is using what

Start with the provider's own records, because they include code you've forgotten about:

  • Anthropic: in the Claude Console, open Usage, click Export and read the CSV. It splits usage by API key and model, so a key that still spends money on claude-sonnet-4-5 points you at the service that needs changing.
  • OpenAI: the deprecations page says GET /v1/models can return a shutdown_date field for models on the way out. Polling it from a scheduled job is a cheap way to hear about the next batch before the email arrives.

Usage data tells you what ran last month. It won't catch a fallback model nobody has triggered yet, or a config file for a feature that ships next week. For that you need to search the code.

Step 2: a CI check that fails before the provider does

Keep the shutdown dates in a small JSON file in your repository. Add a row whenever a provider announces something. Nobody has to remember the dates after that, because the build does.

shutdowns.json (excerpt)
{
  "claude-sonnet-4-5-20250929": { "shutdown": "2026-11-30", "use": "claude-sonnet-5-5" },
  "claude-sonnet-4-5": { "shutdown": "2026-11-30", "use": "claude-sonnet-5-5" },
  "gpt-image-1-mini": { "shutdown": "2026-12-01", "use": "gpt-image-2.6-flare" },
  "gpt-5": { "shutdown": "2026-12-11", "use": "gpt-6.1-sol" },
  "gpt-5-mini": { "shutdown": "2026-12-11", "use": "gpt-6.1-terra" },
  "gpt-4o": { "shutdown": "2027-01-14", "use": "gpt-6-luna" },
  "gpt-4o-mini": { "shutdown": "2027-01-14", "use": "gpt-6-luna" }
}

The script reads that file, walks your source and config, and fails when a model named in the code shuts down within 45 days. Further out, it only prints a warning. It sorts names longest first so gpt-4o-mini isn't also reported as gpt-4o.

check-shutdowns.mjs
// Fails CI when code names a model that shuts down within WARN_DAYS.
// Usage: node check-shutdowns.mjs [dir]   (WARN_DAYS defaults to 45, TODAY overrides the date)
import { readFileSync, readdirSync, statSync } from "node:fs";
import { join, extname } from "node:path";

const table = JSON.parse(readFileSync(new URL("./shutdowns.json", import.meta.url)));
const warnDays = Number(process.env.WARN_DAYS ?? 45);
const today = new Date(process.env.TODAY ?? Date.now());
const exts = new Set([".js", ".mjs", ".ts", ".tsx", ".py", ".go", ".java", ".cs", ".json", ".yaml", ".yml", ".env"]);
const skip = new Set(["node_modules", ".git", "dist", "build", ".next"]);

// Longest names first, so "gpt-4o-mini" isn't also reported as "gpt-4o".
const names = Object.keys(table).sort((a, b) => b.length - a.length);
const pattern = new RegExp(`["'\`=\s](${names.map((n) => n.replace(/\./g, "\.")).join("|")})["'\`\s,]`, "g");

function* files(dir) {
  for (const name of readdirSync(dir)) {
    if (skip.has(name)) continue;
    const p = join(dir, name);
    if (statSync(p).isDirectory()) yield* files(p);
    else if (exts.has(extname(p)) && !p.endsWith("shutdowns.json")) yield p;
  }
}

let failures = 0;
for (const file of files(process.argv[2] ?? ".")) {
  readFileSync(file, "utf8").split("\n").forEach((line, i) => {
    for (const [, model] of line.matchAll(pattern)) {
      const { shutdown, use } = table[model];
      const days = Math.ceil((new Date(shutdown) - today) / 86_400_000);
      const level = days <= warnDays ? "FAIL" : "warn";
      if (level === "FAIL") failures++;
      console.log(`${level} ${file}:${i + 1} ${model} shuts down ${shutdown} (${days} days), move to ${use}`);
    }
  });
}
console.log(failures ? `${failures} reference(s) inside ${warnDays} days` : "no models close to shutdown");
process.exit(failures ? 1 : 0);

We ran it on 13 November against a small test folder. It holds a JavaScript file that defaults to Sonnet 4.5, a Python file that still uses two OpenAI models, and a file that has already moved:

Text
$ node check-shutdowns.mjs src
FAIL src/images.py:1 gpt-image-1-mini shuts down 2026-12-01 (18 days), move to gpt-image-2.6-flare
FAIL src/images.py:2 gpt-5-mini shuts down 2026-12-11 (28 days), move to gpt-6.1-terra
FAIL src/summarise.js:1 claude-sonnet-4-5-20250929 shuts down 2026-11-30 (17 days), move to claude-sonnet-5-5
3 reference(s) inside 45 days

The exit code is 1, so the pipeline stops. Running it on every pull request means nobody can add a new call to a model with weeks left to live. Running it on a nightly schedule catches the moment an old reference crosses the 45-day line. Set WARN_DAYSto fit how long a migration takes your team. If a change needs a security review, 45 days isn't generous.

Step 3: Sonnet 4.5 to 5.5 is more than a rename

Swap the model ID and many existing Sonnet 4.5 requests start returning 400 invalid_request_error. The Sonnet 5.5 migration guide lists the changes. These are the ones most likely to be sitting in your code:

Sonnet 4.5 requestSonnet 5.5
temperature, top_p, top_kRejected. Remove them.
thinking: {type: "enabled", budget_tokens}thinking: {type: "adaptive"} plus output_config.effort
thinking: {type: "disabled"}{type: "between_tools"}
Assistant prefill (last message from the assistant)Rejected. Move the instruction to the system prompt or the user turn.
tool_choice of any or tool{type: "auto"} with strict: true on the tool
output_formatoutput_config.format
No thinking fieldNow runs adaptive thinking by default

The temperature change isn't specific to Sonnet 5.5. API version 2026-10-21 removes it for every model, which we covered in Claude API version 2026-10-21. Two more things change the bill rather than the status code. The same text uses about 30% more tokens, and a 2000×1500 image costs about 2.5 times as many. Sonnet 5.5 also refuses more often, returning stop_reason: "refusal". Make sure your code handles that stop reason instead of treating it as an empty answer.

You can catch the 400s without spending a token. Write a function that checks a request body against the list above, and give it a unit test that loads the real request your code builds:

lint-claude-request.mjs
// Checks a Messages API request body for things Sonnet 5.5 rejects with a 400.
export function lintForSonnet55(body) {
  const problems = [];
  for (const p of ["temperature", "top_p", "top_k"])
    if (p in body) problems.push(`${p} is not accepted, remove it`);
  const t = body.thinking;
  if (t?.type === "enabled" || t?.budget_tokens)
    problems.push('thinking.budget_tokens is gone, use thinking {type:"adaptive"} with output_config.effort');
  if (t?.type === "disabled") problems.push('thinking {type:"disabled"} is rejected, use {type:"between_tools"}');
  if (body.output_format) problems.push("output_format moved to output_config.format");
  if (["any", "tool"].includes(body.tool_choice?.type))
    problems.push('forced tool_choice is rejected, use {type:"auto"} and strict:true on the tool');
  if (body.messages?.at(-1)?.role === "assistant")
    problems.push("assistant prefill is rejected, the last message must be from the user");
  return problems;
}
lint.test.mjs
import { test } from "node:test";
import assert from "node:assert/strict";
import { lintForSonnet55 } from "./lint-claude-request.mjs";
import { body } from "./src/summarise.js";

test("the summary request is ready for Sonnet 5.5", () => {
  const problems = lintForSonnet55({ ...body, model: "claude-sonnet-5-5" });
  assert.deepEqual(problems, [], "\n" + problems.join("\n"));
});

Here's the test run against a typical Sonnet 4.5 request: a low temperature, a thinking budget and a { prefill to force JSON.

Text
$ node --test lint.test.mjs
✖ the summary request is ready for Sonnet 5.5
  AssertionError [ERR_ASSERTION]:
  temperature is not accepted, remove it
  thinking.budget_tokens is gone, use thinking {type:"adaptive"} with output_config.effort
  assistant prefill is rejected, the last message must be from the user
ℹ tests 1
ℹ pass 0
ℹ fail 1

And after the fix, with the JSON instruction moved into the system prompt:

src/summarise.js
export const MODEL = process.env.SUMMARY_MODEL ?? "claude-sonnet-5-5";
export const body = {
  model: MODEL,
  max_tokens: 800,
  thinking: { type: "adaptive" },
  output_config: { effort: "medium" },
  system: "Reply with a single JSON object.",
  messages: [{ role: "user", content: "Summarise this ticket" }],
};
Text
$ node --test lint.test.mjs
✔ the summary request is ready for Sonnet 5.5
ℹ tests 1
ℹ pass 1
ℹ fail 0

A passing lint means the request will be accepted. It doesn't mean the answers are as good as before. For that, run a golden set through both models before you switch, as described in testing a model switch. The same method works for every row in the calendar above.

An order of work, from now to 20 January

  • This week: export usage from both consoles, add shutdowns.json and the check to CI, and open a ticket for every FAIL line.
  • Before 30 November: move Sonnet 4.5 traffic, and anything using Agent Builder, Evals or /v1/prompts. Put the new model behind a config value, so rolling back is a config change and not a deploy.
  • Before 11 December: image models (1 December) and the gpt-5 and o3 families. These are the busiest weeks, so start the golden-set runs early.
  • In the quieter weeks before 14 January: GPT-4o and GPT-4.1, then text-to-speech and realtime audio.

None of this is specific to AI. Providers retire versions of every API, and a dated list in the repository plus a check that fails the build works for all of them. Our contract testing track applies the same idea to ordinary REST dependencies.