On December 11, six models stop serving from the OpenAI API. That's 29 days from today. This isn't breaking news — OpenAI announced it on June 11, and another reminder email went out on November 11. But if your code still says gpt-5 or o3, those 29 days are your migration window.
The sunset list: six models, one replacement table
| Retiring model | Shutdown date | Official replacement |
|---|---|---|
| gpt-5 (2025-08-07 snapshot) | 2026-12-11 | gpt-5.6-sol |
| gpt-5-mini (2025-08-07 snapshot) | 2026-12-11 | gpt-5.6-terra |
| gpt-5-nano (2025-08-07 snapshot) | 2026-12-11 | gpt-5.6-luna |
| gpt-5-pro (2025-10-06 snapshot) | 2026-12-11 | gpt-5.6-sol (reasoning.mode: pro) |
| o3 (2025-04-16 snapshot) | 2026-12-11 | gpt-5.6-sol |
| o3-pro (2025-06-10 snapshot) | 2026-12-11 | gpt-5.6-sol (reasoning.mode: pro) |
Two things worth noticing. First, what retires is the snapshots from August/October 2025 and April/June 2026 — the aliases gpt-5 and o3 point at those snapshots. Second, fine-tuned versions follow the same schedule. Your fine-tune doesn't outlive its base model by a single day.
There's also a platform difference that's easy to miss: the same model retires on different dates on different platforms. o3 leaves Azure OpenAI on November 19 — three weeks earlier than the OpenAI API. Watching only one platform's calendar means missing half the picture.
Four pitfalls: where model sunsets actually break things
Pitfall 1: The model name is hardcoded in your code. If the model name is scattered across agent code, prompt templates, and eval scripts, switching models isn't a one-line change — it's a repo-wide search. The fix is that the model name lives in exactly one place: an environment variable.
Pitfall 2: No fallback. An agent with no fallback configured crashes outright the day its main model stops. A fallback isn't something you "add later" — it's the only thing that keeps you running on sunset day.
Pitfall 3: The replacement model has no price attached. If your cost tracking still prices usage at the old model's rate after you switch, your billing goes blind. Every model swap has to come with a price-table swap.
Pitfall 4: Your eval baseline dies with the model. Scores recorded on the old model can't be re-run after retirement, can't be reproduced, and can't be compared against the new model. Freeze the baseline while the model is still alive: same samples, same prompts, one run on the new model, kept as the reference.
The one-time fix: the model name lives only in an environment variable
// config.ts: the model name appears here and nowhere else
const MODEL = process.env.AGENT_MODEL ?? "gpt-5.6-sol";
const FALLBACK_MODEL = process.env.AGENT_FALLBACK_MODEL ?? "gpt-5.6-terra";
const MODEL_PRICE = Number(process.env.AGENT_MODEL_PRICE_PER_1M ?? 0);
if (!MODEL_PRICE) {
throw new Error("ConfigError: no price configured for " + MODEL);
}
# Migration is two lines — no code changes
export AGENT_MODEL=gpt-5.6-sol
export AGENT_FALLBACK_MODEL=gpt-5.6-terra
# Monitoring: use the official shutdown_date field as an alarm clock for sunset day
import requests
resp = requests.get("https://api.openai.com/v1/models",
headers={"Authorization": "Bearer $OPENAI_API_KEY"})
for m in resp.json()["data"]:
shutdown = m.get("shutdown_date")
if shutdown:
print(m["id"], "->", shutdown)
Three rules: model names go in environment variables, configure a fallback, and let the price follow the model. A price of zero refuses to run — blind billing costs more than a model sunset.
Pre-launch checklist
[ ] grep the whole repo: gpt-5 / gpt-5-mini / gpt-5-nano / gpt-5-pro / o3 / o3-pro
[ ] Model name lives in the environment variable only; everything else reads config
[ ] Fallback model configured and verified with at least one real run
[ ] Replacement model's price is in the cost table; run once and check the bill matches
[ ] Eval baseline frozen: same samples run on the new model, scores kept as reference
[ ] GET /v1/models shutdown_date wired into monitoring or a scheduled job
[ ] Fine-tuned models confirmed on the same schedule; retrain on the new base if needed
Honest limits
This sunset is a routine entry on OpenAI's official calendar, not a sudden cutoff. The replacement advice comes from the official docs, but OpenAI hasn't published head-to-head benchmarks for the replacements, and no price comparison — what the new model actually does on your task, you'll only know by running it yourself. There's another wave after December 11: gpt-5.1 and gpt-5.3-codex are scheduled to retire on April 1, 2027.
Models retire. The way you write code doesn't have to. The day you move the model name into an environment variable is the day you actually own portability.
How many places is the model name scattered across in your agent right now?
Top comments (0)