Repository navigation
chore(models): deactivate retired openai models - #3461
Conversation
OpenAI shut down gpt-5-chat-latest, gpt-5.1-codex, gpt-5.1-codex-mini and gpt-5.2-codex on 2026-07-23 (announced 2026-04-22). Every request to them now 404s with "has been deprecated", which surfaced as 30 e2e failures spanning basic, json, reasoning, tool-call and service-tier suites. Deactivate the openai mappings only. Azure runs its own retirement schedule and still serves all three codex deployments (2027-05-15 / 2027-07-13), so those mappings stay active for BYOK users.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
WalkthroughThe OpenAI model catalog now marks four retired models as deactivated on 2026-07-23. It documents replacement models and later Azure retirement dates where applicable. ChangesOpenAI model metadata
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/models/src/models/openai.ts`:
- Around line 1255-1259: Add future deactivatedAt dates to the Azure provider
objects associated with the mappings at the referenced locations, using the
retirement dates stated in their comments: May 15, 2027 and July 13, 2027. Keep
the existing Azure mappings and comments unchanged, and ensure each Azure
object’s metadata is used by the runtime availability checks.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 60c5bfbd-9fb1-4a5e-99c1-a8ca9fa87af4
📒 Files selected for processing (1)
packages/models/src/models/openai.ts
| // Shut down by OpenAI on 2026-07-23 (announced 2026-04-22); | ||
| // requests now 404 with "has been deprecated". Replacement is | ||
| // gpt-5.6-sol. The azure mapping below stays active — Azure runs | ||
| // its own schedule and does not retire this until 2027-05-15. | ||
| deactivatedAt: new Date("2026-07-23"), |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Add the Azure retirement dates to provider metadata.
The comments state that the Azure mappings retire on May 15, 2027 and July 13, 2027. The Azure provider objects do not set deactivatedAt. The runtime availability checks therefore continue to treat these mappings as active after those dates.
Add future deactivatedAt values to the Azure mappings.
Proposed fix
+deactivatedAt: new Date("2027-05-15"), // gpt-5.1-codex
+deactivatedAt: new Date("2027-05-15"), // gpt-5.1-codex-mini
+deactivatedAt: new Date("2027-07-13"), // gpt-5.2-codexAlso applies to: 1308-1312, 2351-2355
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/models/src/models/openai.ts` around lines 1255 - 1259, Add future
deactivatedAt dates to the Azure provider objects associated with the mappings
at the referenced locations, using the retirement dates stated in their
comments: May 15, 2027 and July 13, 2027. Keep the existing Azure mappings and
comments unchanged, and ensure each Azure object’s metadata is used by the
runtime availability checks.
Follow-up to theopenco#3461, which deactivated four OpenAI models and deliberately left their azure mappings alone because Azure runs an independent schedule. Azure does publish that schedule, so this stamps it onto the catalogue. ## Source [Foundry model retirement schedule](https://learn.microsoft.com/en-us/azure/foundry/openai/concepts/model-retirement-schedule) (`ms.date: 2026-07-23`), read from the doc source rather than the rendered page: `MicrosoftDocs/azure-ai-docs` → `articles/foundry/openai/includes/concepts-model-retirement-schedule-content.md`. Note the `ai-foundry` URL segment 404s; it's `foundry` now. Azure sets a retirement date for every model version at launch (18 months out) and returns `410 Gone` after it. `deactivatedAt` is exactly that semantic, and future dates are already used this way in the catalogue, so each mapping now switches itself off on the right day with no follow-up needed. ## Changes — 26 azure mappings 22 mappings had no date and now carry the published one, ranging from `o3-mini` (2026-10-01) to the gpt-5.6 family (2028-01-11). Four already had `deactivatedAt: 2026-12-10`, which is **OpenAI's** first-party date copied onto the azure mapping, not Azure's: | mapping | was | Azure publishes | |---|---|---| | azure `o3` | 2026-12-10 | **2026-10-21** | | azure `gpt-5` | 2026-12-10 | 2027-02-09 | | azure `gpt-5-mini` | 2026-12-10 | 2027-02-09 | | azure `gpt-5-nano` | 2026-12-10 | 2027-02-09 | `o3` is the one that actually bites — Azure retires it seven weeks *before* our date, so routing would have kept selecting a deployment returning 410. The other three go the other way and extend a mapping's life by ~2 months; flagging that explicitly since it resurrects mappings that were scheduled to switch off, and it's a revert of one line each if you'd rather not. The openai mappings keep 2026-12-10 in all four cases — only the azure side moved. Both directions are commented in place. ## Left alone - **`gpt-35-turbo`, `gpt-4`, `gpt-4-turbo`, `gpt-5.2-pro`, `gpt-oss-120b`** — no row in the schedule. For the first three that likely means "retired long ago and dropped from the table", but absence isn't a date and I'd rather not guess; worth a separate look. - **`gpt-5.2-chat-latest` / `gpt-5.3-chat-latest`** — Azure's rows are `gpt-5.2-chat` / `gpt-5.3-chat` plus a separate `gpt-chat-latest`, so the externalId doesn't map cleanly. Both already deactivate on 2026-08-10 regardless. - **`gpt-4o-mini` (2026-03-31) and `o1-mini` (2025-10-27)** — already past. - **azure-ai-foundry grok mappings** — `grok-4-1-fast-*` are listed GA with no retirement date; `grok-4.3` isn't listed. - **`deprecatedAt`** — Azure's "Deprecated" lifecycle (blocked for new customers, still serving) maps neatly onto our `deprecatedAt`, which filters a mapping out of selection without breaking explicit pins. That would change routing behaviour, so it's out of scope here. ## Verification Every insertion verified to land on a `providerId: "azure"` mapping, not the sibling openai one. `pnpm format`, `pnpm build`, and `packages/models` + `packages/actions` + gateway model-route specs (687 tests) all pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Problem
30 of the failures in the last e2e run were four OpenAI models failing every test type —
basic,json,reasoning,tool calls,service_tier— with 500s. Probed against the live OpenAI API, all four are gone:Per OpenAI's deprecations page they were announced on 2026-04-22 and shut down on 2026-07-23, replaced by
gpt-5.6-sol(gpt-5.6-terrafor codex-mini). They still appear inGET /v1/models, which is why this wasn't obvious — only an actual inference call reveals it.Nothing to fix on our side: the models are simply retired upstream.
Change
deactivatedAt: new Date("2026-07-23")on the four openai mappings — the real shutdown date, not today's, matching the existingo1-miniprecedent in this file.The azure mappings stay active. Azure runs its own retirement schedule and still serves all three codex deployments —
gpt-5.1-codexandgpt-5.1-codex-miniuntil 2027-05-15,gpt-5.2-codexuntil 2027-07-13 (per the Foundry model retirement schedule). Deactivating them would break BYOK users with working Azure deployments.gpt-5-chat-latesthas no azure mapping, so that model goes away entirely.Verification
Swept every active
openaiprovider mapping in the catalogue against the live API with an intentionally-invalid parameter (so a live model 400s without generating tokens, a retired one 404s). These four are the only dead ones — the remaining 404s aregpt-5.2-pro/gpt-5.4-pro/gpt-5.5-pro/gpt-5.3-codexreturning "not a chat model", which is expected for Responses-only models and confirmed working on/v1/responses.pnpm formatandpnpm buildpass;packages/models,packages/actions, and the gateway/api model-route specs pass (809 tests). The fullpnpm test:unitrun is unusable on this machine — it shares Postgres with other worktrees and times out under parallel load; the same specs pass when run scoped.🤖 Generated with Claude Code
Summary by CodeRabbit