fix(codex): allowlist the GPT-6 family for ChatGPT-subscription users

DE
1d ago
+44-3

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):

idCodex catalogmodels.dev openai
gpt-6.1-solvisibility: "list", priority 1, upgrade: null, minimal_client_version 0.153.0, plus/pro in available_in_planspresent, release_date 2026-09-29
gpt-6-astravisibility: "list", priority 2, upgrade: null, 0.153.0, plus/propresent, release_date 2026-09-04
gpt-6-solvisibility: "list", priority 3, upgrade: null, 0.155.0, plus/propresent, release_date 2026-09-22
gpt-6-lunavisibility: "list", priority 4, upgrade: null, 0.155.0, plus/propresent, 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.ts ALLOWED_MODELS. That file is still not wired, and its comments don't ask for parity. The codex.ts comment says not to assume the two files share a policy. Its parseFloat > 5.4 fallback would already admit gpt-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 --noEmit in packages/opencode: clean. I ran it with --singleThreaded because 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.ts patterns: 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, and gpt-6-luna to OAUTH_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_UNPROBED test constant until each returns HTTP 200 against the live endpoint, after which each moves into VERIFIED_ACCEPTED.
  • No allowlisted gpt-5.x ids are removed; the catalog names gpt-6-sol and gpt-6-luna as their upgrade targets with no retirement dates, so the existing entries stay.
  • The trip-wire test now asserts OAUTH_ALLOWED_MODELS equals VERIFIED_ACCEPTED plus CATALOG_VERIFIED_UNPROBED, and a new test keeps the catalog group disjoint from both probed lists.