OpenAI retires dated gpt-4o, gpt-4o-mini, gpt-4.1 and gpt-4.1-mini versions on 14 January 2027: what to change
On 14 January 2027, OpenAI removes dated gpt-4o, gpt-4o-mini, gpt-4.1 and gpt-4.1-mini versions from the API. From that day, API calls to these models fail. OpenAI's recommended replacement (as of 13 November 2026): gpt-
On 14 January 2027, OpenAI removes dated gpt-4o, gpt-4o-mini, gpt-4.1 and gpt-4.1-mini versions from the API. From that day, API calls to these models fail. OpenAI's recommended replacement (as of 13 November 2026): gpt-6-luna.
What retires, and what replaces it
OpenAI lists these models on its deprecations page. The dates and replacements on this page come from Driftline's registry, which is checked against that page several times a day, so they stay current if OpenAI changes them.
Only these dated versions are on OpenAI's list. The short names (gpt-4o, gpt-4o-mini, gpt-4.1, gpt-4.1-mini) aren't, so check which version your code really calls.
| Model | Replacement | Moving to it |
|---|---|---|
gpt-4o-2024-08-06 |
gpt-6-luna |
Rename |
gpt-4o-2024-11-20 |
gpt-6-luna |
Rename |
gpt-4o-mini-2024-07-18 |
gpt-6-luna |
Rename |
gpt-4.1-2025-04-14 |
gpt-6-luna |
Rename |
gpt-4.1-mini-2025-04-14 |
gpt-6-luna |
Rename |
Find every place your code uses them
Run this in the root of your repository. No install, account or API key; it lists every OpenAI, Anthropic and Google model ID it finds, with file, line, retirement date and replacement:
npx -y @aidriftline/driftline .
A plain search works too:
grep -rnE '"(gpt-4o-2024-08-06|gpt-4o-2024-11-20|gpt-4o-mini-2024-07-18|gpt-4\.1-2025-04-14|gpt-4\.1-mini-2025-04-14)"' .
It misses model names set outside the code: environment variables, deployment settings, values stored in a database, and defaults inside SDKs or agent frameworks you never configured.
Test before 14 January 2027
A new model answers the same prompt differently: format, length, tone, and whether JSON still parses. Take 10 to 20 real prompts from your logs, run each on the old model and the replacement, and compare. Do it while the old model still answers; after the date there is nothing left to compare against.
Driftline Pro does this in your GitHub Actions: it runs the prompts your app sends on the current model and the replacement, and shows what changed in the pull request.
Get a reminder
The free Driftline GitHub Action flags retired and soon-to-retire model IDs on every pull request, so the next retirement doesn't come as a surprise.
Questions
Will calls to gpt-4o keep working after 14 January 2027?
Calls to the dated versions listed above stop working on that day and return an error. Check which version a short name like gpt-4o points to before relying on it.
I build Driftline, which tracks these retirement dates. The current list, with one page per model: aidriftline.com/models.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.