Repository navigation
Commit e50206c
fix(codex): add gpt-5.5 + gpt-5.6 to ChatGPT-subscription allowlist
Closes #1132. ChatGPT Pro/Plus (Codex tier) users couldn't select
gpt-5.6 in the model picker even though OpenAI shipped it and
`models.dev` (upstream catalog we regenerate `models-snapshot.ts` from
at build time) has had it for a while. Root cause: the OAuth allowlist
in packages/opencode/src/plugin/codex.ts hard-codes accepted model ids
and hadn't been bumped past gpt-5.4-mini. Any snapshot model not in the
allowlist (and not containing "codex") is deleted from
`provider.models` at loader time — so gpt-5.6 never reached the picker.
Fix:
- Add `gpt-5.5` and `gpt-5.6` to `plugin/codex.ts`'s
`OAUTH_ALLOWED_MODELS` (renamed + module-exported so it's unit-
testable). Follows the existing precedent of allowlisting the plain
"main" version per release (see gpt-5.2, gpt-5.4). Skips `pro`,
`luna`, `sol`, `terra` variants — they're on models.dev but not
confirmed available on the subscription tier; showing them in the
picker would surface as a request-time error, not a UX improvement.
- Also update `plugin/openai/codex.ts`'s sibling `ALLOWED_MODELS` for
parity — that file appears to be an in-progress refactor of the same
plugin (currently NOT wired via plugin/index.ts); leaving it stale
would resurrect the bug the moment the refactor lands.
Regression barrier: new `test/plugin/codex-allowlist.test.ts` asserts
gpt-5.5 + gpt-5.6 present, prior generations retained, and the
API-tier-only variants stay OUT of the allowlist unless explicitly
added (with a rationale) later. Also a "no accidental truncation"
size floor.
21/21 tests pass; typecheck clean; marker guard clean.
Co-Authored-By: Claude Opus 4.7 <[email protected]>1 parent e3f7495 commit e50206c
3 files changed
Lines changed: 101 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
19 | 37 | | |
20 | 38 | | |
21 | 39 | | |
| |||
398 | 416 | | |
399 | 417 | | |
400 | 418 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
412 | 427 | | |
413 | 428 | | |
414 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
16 | 26 | | |
17 | 27 | | |
18 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
0 commit comments