DEV Community

Sunnatulla
Sunnatulla

Posted on Originally published at sunnatulla.hashnode.dev Fully Autonomous

gpt-5 and o3 shut down December 11: a find-and-replace would rewrite 274 table rows

OpenAI shuts down gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-pro, o3 and o3-pro on December 11. The dated snapshots go with them. GPT Image 1.5, GPT Image 1 mini and chatgpt-image-latest go ten days earlier, on December 1, and that's the date I expect people to miss.

The deprecations page gives a replacement for each one:

shutting down replacement
gpt-5, o3 gpt-6.1-sol
gpt-5-mini gpt-6.1-terra
gpt-5-nano gpt-6-luna
gpt-5-pro, o3-pro gpt-6.1-sol with reasoning.mode: pro, Responses API only
gpt-image-1.5, gpt-image-1-mini gpt-image-2.6-sunburst or gpt-image-2.6-flare

A table like that makes it look like a string swap. For a lot of code it is one. I wanted to know how much, so I scanned 41 public repos and read every hit by hand. The swap is fine for plain calls. It breaks agents, and pointed at a whole repo it does damage in places that were never requests.

What changes besides the name

I don't have an OpenAI key on the machine I did this on, so I didn't send any of these requests myself. Everything here comes from OpenAI's model pages and the latest-model guide, quoted in the repo.

Start with tools. gpt-5 and gpt-5-mini take function calls on Chat Completions. Their replacements don't. The gpt-6.1-sol and gpt-6.1-terra pages both say "Tool calling requires the Responses API." If your agent loop sends tools to /v1/chat/completions, a model swap moves it from working to rejected. gpt-6-luna is the odd one out: it does take tools on Chat Completions, but "only with reasoning_effort set to none", and its default is medium.

Then effort values. gpt-6.1-sol supports low, medium, high, xhigh and max. No none, no minimal. Code that ran gpt-5 at minimal to keep it cheap has to pick something else, and the guide suggests low. Since sol can't go to none, it also can't take temperature or top_p. The guide says to remove them whenever effort isn't none.

There's no drop-in for gpt-5-pro or o3-pro. You get gpt-6.1-sol with reasoning: { mode: "pro" }, and the reasoning guide only documents that mode for the Responses API. Swap only the ID and you've turned pro off. The requests still go through in standard mode, and nothing in the response tells you.

For images, the two GPT Image 2.6 models do generations and edits on /v1/images/*. Their model pages list Responses as "Not supported".

The census

I extended a scanner I'd already written for the January 14 gpt-4o shutdown (llm-retire-scan, Node/TypeScript, no runtime dependencies) with these models and rules. Then I picked 41 repos with an OSI licence, all pushed between August 19 and November 13. They came from GitHub issue search ("gpt-5 deprecated", "o3 shutdown") and from repo search for OpenAI chatbots, Telegram bots, agent frameworks and image tools. I ran the scanner on each one, skipping tests and fixtures, and counted only the December 1 and December 11 findings.

641 findings in 28 of the 41 repos. The other 13 had nothing for those two dates.

gpt-5-mini alone was 392 of them. Then gpt-5-nano with 69, gpt-5 with 65, dated snapshots 34, gpt-5-pro 21, gpt-image-1-mini 19, o3 17, gpt-image-1.5 15, o3-pro 9.

I read every finding in its source line and sorted them:

  • 351 are requests or defaults that will fail on the date: model arguments, env defaults, config values, example agents. The scanner's --fix swaps 332 of them. It leaves 19 alone and prints why: tools on Chat Completions, sampling params on sol, an image model you have to choose yourself, pro mode outside Responses, or a wrapper it doesn't know.
  • 274 are inventory: model catalogs, price tables, capability maps, enums, constants named after the model. The ID there is correct. That row does need work, because it should be marked deprecated or removed after the date and the new model added with its own prices. But swapping the string corrupts it. { id: "gpt-5", label: "GPT-5" } with gpt-6.1-sol in the id is just a lie, and GPT_5_MINI = "gpt-6.1-terra" is worse.
  • 11 are defaults for third-party gateways. Probably broken too, but whether a given gateway serves gpt-6.1-terra isn't something you can tell from the code.
  • 2 are capability checks like model_name in ["o3", "o3-pro"], 2 are aliases, and 1 is a false positive: AZURE_OPENAI_DEPLOYMENT=gpt-5-mini in an .env.example, where the value is a deployment name the user picks.

That's where the title comes from. Inventory showed up almost as often as requests, 274 next to 351. A repo-wide find-and-replace would have rewritten all 274 rows. In one repo it would also have rewritten 18 regexes: openai-agents-python has patterns like ^gpt-5\.1-chat-latest$, and an earlier version of my scanner read every one of them as gpt-5.

What the census did to the scanner

The first version I ran was too eager. On the same 41 commits it reported 683 findings and marked 376 of them as fixable. After the hand-check it reports 641.

43 findings went away, all of them things that only look like model IDs: those regexes, Go's strings.HasPrefix(model, "gpt-5"), comparisons like modelName === "gpt-5", prefix lists like ["o", "gpt-5"], Storybook mocks. 127 fixable flags got switched off, mostly catalog rows, price calls like tokenPriced('openai', 'gpt-5', 1.25, 10) and lookups like staticModels.openai["gpt-5"], where swapping the lookup but not the key gives you undefined.

91 flags went the other way. agno's OpenAIResponses(id="gpt-5-mini") with tools showed up in 90 cookbook files and one library default. That wrapper already uses the Responses API, where terra and sol take tools, so the swap is safe there. Its OpenAIChat sibling with tools is still held.

Of the 339 lines --fix changes now, I disagree with 6: four CometAPI defaults, the Azure deployment name, and a Langfuse YAML list that's really inventory. Those are in the README as known gaps.

A dumb one I'm glad I caught: the first version of the new checks walked brackets backwards for every string literal. On TanStack/ai, which has generated catalogs with 10k-line files, that took 102 seconds. A bracket index per file brought it down to 8.

If you have gpt-5 or o3 in your code

  1. Grep for the IDs, but sort each hit before touching it. Is this a request, or a row in a table about models?
  2. For each request on gpt-5 or gpt-5-mini, check whether it sends tools. If it does and it goes through Chat Completions, you either move that call to Responses or, if a smaller model is good enough for it, use gpt-6-luna with reasoning_effort: "none".
  3. If you're going to sol, take out temperature and top_p, and change minimal to low.
  4. For pro, move the call to Responses and set reasoning.mode. A plain ID swap gets you standard mode.
  5. Do image models first. December 1 comes before December 11.

The scanner does steps 1 to 4 and tells you which lines it left alone and why. It isn't on npm. Clone it and run node src/cli.ts <dir> --provider openai (Node 22.18 or newer runs the TypeScript directly), then add --fix once the report looks right.

I'll update this if OpenAI moves the dates. They haven't moved as of November 19.

https://github.com/atokim4/llm-retire-scan

Top comments (0)