fix(codex): allowlist the GPT-6 family for ChatGPT-subscription users
Issue for this PR
Closes #1564
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
Not backend-probed. @anandgupta42, please probe the four new ids before merging. I couldn't call the live POST https://chatgpt.com/backend-api/codex/responses endpoint because I don't have a ChatGPT credential. Every id added here is based on catalog evidence only. If one returns 400 … not supported when using Codex with a ChatGPT account, drop it from OAUTH_ALLOWED_MODELS and move it to VERIFIED_REJECTED. If it returns 200, move it from CATALOG_VERIFIED_UNPROBED to VERIFIED_ACCEPTED.
OAUTH_ALLOWED_MODELS hides the whole GPT-6 family from ChatGPT Plus/Pro users. That includes gpt-6.1-sol, which the Codex client now uses as its default (openai/codex#49318). It also includes the upgrade targets that the Codex catalog now names for every gpt-5.x id we allowlist.
Added (all four come from openai/codex codex-rs/models-manager/models.json on main, last changed in openai/codex@d63a9b8344, fetched 2026-10-19):
| id | Codex catalog | models.dev openai |
|---|---|---|
gpt-6.1-sol | visibility: "list", priority 1, upgrade: null, minimal_client_version 0.153.0, plus/pro in available_in_plans | present, release_date 2026-09-29 |
gpt-6-astra | visibility: "list", priority 2, upgrade: null, 0.153.0, plus/pro | present, release_date 2026-09-04 |
gpt-6-sol | visibility: "list", priority 3, upgrade: null, 0.155.0, plus/pro | present, release_date 2026-09-22 |
gpt-6-luna | visibility: "list", priority 4, upgrade: null, 0.155.0, plus/pro | present, release_date 2026-09-22 |
Removed: none. No allowlisted id has visibility: "hide" or a retirement_at. Four of them now name an upgrade, but none has a retirement date:
gpt-5.5 list upgrade -> gpt-6-sol retirement_at: null
gpt-5.6-sol list upgrade -> gpt-6-sol retirement_at: null
gpt-5.6-terra list upgrade -> gpt-6-sol retirement_at: null
gpt-5.6-luna list upgrade -> gpt-6-luna retirement_at: null
Both replacements, gpt-6-sol and gpt-6-luna, are allowlisted by this PR. gpt-5.3-codex-spark doesn't appear in the shipped catalog, but it never has (I checked catalog revisions back to 2026-04). It stays because it is backend-probed.
How the change is structured. The new ids go into their own test constant, CATALOG_VERIFIED_UNPROBED, not VERIFIED_ACCEPTED, so the probed truth table stays honest. The trip-wire test now asserts OAUTH_ALLOWED_MODELS == VERIFIED_ACCEPTED ∪ CATALOG_VERIFIED_UNPROBED. A new test asserts the catalog group doesn't overlap either probed list. In codex.ts, the four ids are added at the end of the OAUTH_ALLOWED_MODELS set literal, inside an altimate_change block (codex.ts is in requireMarkers). The comment on that block records the catalog evidence and marks these ids as the exception to "every entry was verified".
Not touched:
plugin/openai/codex.tsALLOWED_MODELS. That file is still not wired, and its comments don't ask for parity. Thecodex.tscomment says not to assume the two files share a policy. ItsparseFloat > 5.4fallback would already admitgpt-6*.- API-key behaviour. The filter runs only when
auth.type === "oauth".
Cold-cache caveat. The committed provider/models-snapshot.ts has no GPT-6 entry, so a source checkout won't show these models until the catalog refreshes. Release builds embed the live models.dev catalog (#1188), and that catalog has all four.
How did you verify your code works?
bun test test/plugin/codex-allowlist.test.ts test/plugin/codex.test.ts: 34 pass, 0 fail.tsgo --noEmitinpackages/opencode: clean. I ran it with--singleThreadedbecause the default multi-checker run was OOM-killed on the 7 GB sandbox, which has nothing to do with this diff.bun run script/upstream/analyze.ts --markers --base <main> --strict: ok.script/check-tracker-leaks.tspatterns: no matches in the added lines.- Re-parsed both catalogs to build the tables above.
- Not done: a live backend probe of the four new ids (see the top of this description).
Cost side effects
None. This only changes which ids the OAuth model picker keeps. It adds no model calls, queries or resources.
Screenshots / recordings
N/A, not a UI change.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
- I checked for cost side effects (model calls, queries or cloud resources that grow with user data) and described them, or wrote "none"
Summary by cubic
Allows the GPT-6 model family for ChatGPT-subscription users in the Codex plugin. The OAuth allowlist previously hid every gpt-6* id, including gpt-6.1-sol, which the Codex client now uses as its default.
- Adds
gpt-6.1-sol,gpt-6-astra,gpt-6-sol, andgpt-6-lunatoOAUTH_ALLOWED_MODELS, based on catalog evidence (openai/codex models.json and models.dev). - The new ids are not yet backend-probed; they land in a separate
CATALOG_VERIFIED_UNPROBEDtest constant until each returns HTTP 200 against the live endpoint, after which each moves intoVERIFIED_ACCEPTED. - No allowlisted
gpt-5.xids are removed; the catalog namesgpt-6-solandgpt-6-lunaas their upgrade targets with no retirement dates, so the existing entries stay. - The trip-wire test now asserts
OAUTH_ALLOWED_MODELSequalsVERIFIED_ACCEPTEDplusCATALOG_VERIFIED_UNPROBED, and a new test keeps the catalog group disjoint from both probed lists.