Skip to content

Commit 7f848c5

Browse files
anandgupta42claude
andcommitted
fix: drop gpt-5.4 and gpt-5.4-mini from the subscription allowlist
Both retire from the ChatGPT-subscription model picker at 2026-08-31T19:00:00Z. `openai/codex`'s shipped catalog (codex-rs/models-manager/models.json, fetched first-hand) marks both `visibility: "hide"` with `upgrade.retirement_at: "2026-08-31T19:00:00Z"` and names the replacements: gpt-5.4 -> gpt-5.6-terra, gpt-5.4-mini -> gpt-5.6-luna. Both replacements are already in `OAUTH_ALLOWED_MODELS`, so affected users land on a working model with no further change. This is a subscription-picker retirement, NOT an API deprecation: both ids still carry `supported_in_api: true`, neither is on OpenAI's deprecations page, and models.dev marks neither `deprecated`. The filter only runs when `auth.type === "oauth"`, so API-key users are unaffected. It will not self-heal. models.dev hard-deletes an id only once it stops serving entirely, and these remain live API models, so the catalog keeps them. Left in the allowlist they would sit in the subscription picker past the deadline and fail at request time with the same opaque 400 that #1179 rebuilt this list to prevent. Tests: gpt-5.4 / gpt-5.4-mini move out of VERIFIED_ACCEPTED into a new RETIRED_FROM_SUBSCRIPTION constant rather than into VERIFIED_REJECTED — they probed HTTP 200, so they stopped being offered rather than being refused, and collapsing the two would misrepresent the evidence. Adds coverage that each retired id is excluded and that its documented replacement is still offered. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VqnuBDGkh1ZT65Ti7e6DHZ
1 parent c59a5a2 commit 7f848c5

2 files changed

Lines changed: 55 additions & 12 deletions

File tree

‎packages/opencode/src/plugin/codex.ts‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,31 @@ const OAUTH_POLLING_SAFETY_MARGIN_MS = 3000
111111
* the mechanism is a small drop-in: fetch, keep ``visibility === "list"``, and
112112
* fall back to this set whenever the response is empty or the call fails.
113113
*
114+
* RETIRED — ``gpt-5.4`` and ``gpt-5.4-mini`` are excluded as of
115+
* 2026-08-31T19:00:00Z.
116+
* ``openai/codex``'s own shipped catalog
117+
* (codex-rs/models-manager/models.json) marks both ``visibility: "hide"`` with
118+
* ``upgrade.retirement_at: "2026-08-31T19:00:00Z"`` and the migration text
119+
* "GPT-5.4 is no longer available. Codex now uses GPT-5.6 Terra in place of
120+
* GPT-5.4." The documented replacements — ``gpt-5.4`` -> ``gpt-5.6-terra``,
121+
* ``gpt-5.4-mini`` -> ``gpt-5.6-luna`` — are both already in this set, so
122+
* affected users have a working model without further change.
123+
*
124+
* This is a retirement from the ChatGPT-subscription picker, NOT an API
125+
* deprecation: both ids still carry ``supported_in_api: true``, neither is on
126+
* OpenAI's deprecations page, and models.dev does not mark either
127+
* ``deprecated``. API-key auth is unaffected and follows a longer schedule —
128+
* this filter only runs when ``auth.type === "oauth"`` (see the models loader
129+
* below), so key-authenticated users keep both ids.
130+
*
131+
* Because models.dev keeps serving these entries (they are still live API
132+
* models), leaving them here would NOT self-heal after the deadline: they
133+
* would stay in the subscription picker and fail at request time with the same
134+
* opaque 400 this allowlist exists to prevent.
135+
*
114136
* Exported for unit-test coverage — see test/plugin/codex-allowlist.test.ts. */
115137
export const OAUTH_ALLOWED_MODELS = new Set([
116138
"gpt-5.3-codex-spark",
117-
"gpt-5.4",
118-
"gpt-5.4-mini",
119139
"gpt-5.5",
120140
"gpt-5.6-luna",
121141
"gpt-5.6-sol",

‎packages/opencode/test/plugin/codex-allowlist.test.ts‎

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,20 @@ import { describe, expect, test } from "bun:test"
4646
import { OAUTH_ALLOWED_MODELS, disallowedOAuthModelKeys, shouldAllowOAuthModel } from "../../src/plugin/codex"
4747

4848
/** Verified HTTP 200 on a ChatGPT Pro subscription credential. */
49-
const VERIFIED_ACCEPTED = [
50-
"gpt-5.3-codex-spark",
51-
"gpt-5.4",
52-
"gpt-5.4-mini",
53-
"gpt-5.5",
54-
"gpt-5.6-luna",
55-
"gpt-5.6-sol",
56-
"gpt-5.6-terra",
57-
]
49+
const VERIFIED_ACCEPTED = ["gpt-5.3-codex-spark", "gpt-5.5", "gpt-5.6-luna", "gpt-5.6-sol", "gpt-5.6-terra"]
50+
51+
/** Retired from the ChatGPT-subscription picker on 2026-08-31T19:00:00Z.
52+
*
53+
* Both probed HTTP 200 before the deadline, so they are not in
54+
* VERIFIED_REJECTED — they stopped being offered rather than being refused.
55+
* Source: `openai/codex`'s shipped codex-rs/models-manager/models.json marks
56+
* both `visibility: "hide"` with `upgrade.retirement_at: "2026-08-31T19:00:00Z"`.
57+
* Replacements (gpt-5.4 -> gpt-5.6-terra, gpt-5.4-mini -> gpt-5.6-luna) are in
58+
* VERIFIED_ACCEPTED above.
59+
*
60+
* These are still live API models, so models.dev keeps them and the catalog
61+
* will not drop them for us — the allowlist is what has to. */
62+
const RETIRED_FROM_SUBSCRIPTION = ["gpt-5.4", "gpt-5.4-mini"]
5863

5964
/** Verified HTTP 400 "not supported when using Codex with a ChatGPT account". */
6065
const VERIFIED_REJECTED = [
@@ -94,6 +99,23 @@ describe("OAUTH_ALLOWED_MODELS — verified subscription truth table", () => {
9499
// against the live endpoint first and land it in VERIFIED_ACCEPTED too.
95100
expect([...OAUTH_ALLOWED_MODELS].sort()).toEqual([...VERIFIED_ACCEPTED].sort())
96101
})
102+
103+
test("ids retired from the subscription picker are not offered", () => {
104+
// gpt-5.4 / gpt-5.4-mini retired 2026-08-31T19:00:00Z. They remain live API
105+
// models, so models.dev still lists them and the catalog will not remove
106+
// them for us — if they were still allowlisted they would sit in the
107+
// subscription picker and fail at request time.
108+
for (const id of RETIRED_FROM_SUBSCRIPTION) {
109+
expect(OAUTH_ALLOWED_MODELS.has(id)).toBe(false)
110+
expect(shouldAllowOAuthModel(id)).toBe(false)
111+
}
112+
})
113+
114+
test("each retired id's documented replacement is offered", () => {
115+
// The point of removing them is that users land somewhere that works.
116+
expect(shouldAllowOAuthModel("gpt-5.6-terra")).toBe(true) // replaces gpt-5.4
117+
expect(shouldAllowOAuthModel("gpt-5.6-luna")).toBe(true) // replaces gpt-5.4-mini
118+
})
97119
})
98120

99121
describe("shouldAllowOAuthModel — behavior of the filter itself", () => {
@@ -177,10 +199,11 @@ describe("disallowedOAuthModelKeys — what the loader actually deletes", () =>
177199
const models = {
178200
"gpt-5.6-sol": model(undefined),
179201
"gpt-5.6": model(undefined),
202+
// gpt-5.4 is retired from the subscription picker, so it is deleted too.
180203
"gpt-5.4": { api: {} },
181204
"gpt-5.2": { api: {} },
182205
}
183-
expect(disallowedOAuthModelKeys(models).sort()).toEqual(["gpt-5.2", "gpt-5.6"])
206+
expect(disallowedOAuthModelKeys(models).sort()).toEqual(["gpt-5.2", "gpt-5.4", "gpt-5.6"])
184207
})
185208

186209
test("the catalog set resolves identically whether matched by key or api.id", () => {

0 commit comments

Comments
 (0)