Skip to content

chore(models): deactivate retired openai models - #3461

Merged
steebchen merged 1 commit into
mainfrom
chore/deactivate-retired-openai-models
Aug 7, 2026
Merged

steebchen merged 1 commit into
mainfrom
chore/deactivate-retired-openai-models

Conversation

@steebchen

@steebchen steebchen commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

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:

gpt-5-chat-latest    404  The model `gpt-5-chat-latest` has been deprecated
gpt-5.1-codex        404  The model `gpt-5.1-codex` has been deprecated
gpt-5.1-codex-mini   404  The model `gpt-5.1-codex-mini` has been deprecated
gpt-5.2-codex        404  The model `gpt-5.2-codex` has been deprecated

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-terra for codex-mini). They still appear in GET /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 existing o1-mini precedent in this file.

The azure mappings stay active. Azure runs its own retirement schedule and still serves all three codex deployments — gpt-5.1-codex and gpt-5.1-codex-mini until 2027-05-15, gpt-5.2-codex until 2027-07-13 (per the Foundry model retirement schedule). Deactivating them would break BYOK users with working Azure deployments. gpt-5-chat-latest has no azure mapping, so that model goes away entirely.

Verification

Swept every active openai provider 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 are gpt-5.2-pro / gpt-5.4-pro / gpt-5.5-pro / gpt-5.3-codex returning "not a chat model", which is expected for Responses-only models and confirmed working on /v1/responses.

pnpm format and pnpm build pass; packages/models, packages/actions, and the gateway/api model-route specs pass (809 tests). The full pnpm test:unit run 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

  • Model Availability
    • Updated model listings to reflect the retirement of four OpenAI models.
    • Documented recommended replacement models and applicable retirement timelines.

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.
Copilot AI lite review requested due to automatic review settings August 7, 2026 17:30
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The 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.

Changes

OpenAI model metadata

Layer / File(s) Summary
Record OpenAI model retirements
packages/models/src/models/openai.ts
Adds deactivation metadata for four models. Documents gpt-5.6-sol or gpt-5.6-terra as replacements and records applicable Azure retirement dates.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: smakosh, amineace, ratchaw

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the deactivation of retired OpenAI models, which is the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/deactivate-retired-openai-models

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ed7907b and 7d1f0ba.

📒 Files selected for processing (1)
  • packages/models/src/models/openai.ts

Comment on lines +1255 to +1259
// 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"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 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-codex

Also 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.

@steebchen
steebchen merged commit 24e6d1e into main Aug 7, 2026
12 checks passed
@steebchen
steebchen deleted the chore/deactivate-retired-openai-models branch August 7, 2026 17:50
pull Bot pushed a commit to soitun/llmgateway that referenced this pull request Aug 8, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants