Repository navigation
Commit 930c0a6
fix(codex): add gpt-5.5 + gpt-5.6 to ChatGPT-subscription allowlist (closes AltimateAI#1132) (AltimateAI#1133)
* fix(codex): add gpt-5.5 + gpt-5.6 to ChatGPT-subscription allowlist
Closes AltimateAI#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]>
* fix(codex): address bot round — unify allowlist filter, revert upstream file
Round 2 on AltimateAI#1133. Addresses coderabbit / kilo / cubic findings:
- **plugin/codex.ts (fork-owned)**: extracted the OAuth model filter
into a shared `shouldAllowOAuthModel(id)` helper (exported alongside
`OAUTH_ALLOWED_MODELS`). The loader now delegates to it, so the
allowlist AND the includes("codex") auto-allow are one source of
truth. Dropped the 5 redundant *-codex entries from the set (they
were already auto-allowed) — bots correctly flagged the comment
contradicting the contents. Set is now 5 non-codex entries only.
- **plugin/openai/codex.ts (upstream-shared)**: fully REVERTED my
round-1 changes here. That file has an existing `parseFloat(match[1])
> 5.4` catch-all in its `models()` filter that already admits
gpt-5.6, and its whole filtering policy is upstream's design choice.
Overriding it in this bug fix would (a) be a divergence from
upstream, (b) require altimate_change markers I hadn't added (marker
guard rightly failed), and (c) reopen the "should we admit API-tier
variants?" debate that isn't the point of this issue. That file is
ALSO not the active plugin — plugin/index.ts imports from ./codex
(the fork-owned one this PR does fix). Cleanest outcome: leave
upstream alone, fix the fork's file, note the drift in the test
file's docstring.
- **test/plugin/codex-allowlist.test.ts**: expanded from 5 to 11
assertions. Splits into two describe blocks:
• the CONSTANT (allowlist membership) — the prior barrier
• the BEHAVIOR (`shouldAllowOAuthModel` filter) — new; catches
breakage where a refactor stops consuming OAUTH_ALLOWED_MODELS,
which the constant-only tests would silently pass. (cubic P3.)
26/26 tests pass; typecheck clean; marker guard will be clean once
this commit lands (HEAD's diff-against-origin/main for the upstream
file drops to zero after this commit).
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* docs(codex): correct stale sibling-plugin ownership comments
coderabbit MINOR round-3 catch: after reverting the plugin/openai/codex.ts
changes, the docstring on `shouldAllowOAuthModel` and the test file's
top comment still claimed the helper is "shared across both files" —
that hasn't been true since I reverted openai/codex.ts. A future
contributor reading the current tip would mistakenly assume the sibling
filter has the same policy.
Both docstrings now describe this as the ACTIVE plugin's policy
(plugin/codex.ts, wired via plugin/index.ts) and explicitly call out
that plugin/openai/codex.ts has its own separate filter with the
parseFloat > 5.4 fallback — adopting the shared helper is followup on
that file's refactor.
Doc-only. 26/26 tests pass; typecheck clean; marker guard clean.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
* docs(codex): correct loader comment (was still claiming shared policy)
Round 4 doc fix on AltimateAI#1133. My previous docstring fix on
`shouldAllowOAuthModel` correctly noted that plugin/openai/codex.ts
has its own separate filter, but the LOADER comment 5 lines below
still said "this filter and the sibling in plugin/openai/codex.ts
share one source of truth" — kilo + cubic both flagged the
contradiction independently.
Rewrote the loader comment to match the helper docstring: this file
is the active plugin, the sibling is an unwired refactor with its
own ALLOWED_MODELS + parseFloat > 5.4 fallback, they do NOT share a
source of truth today.
Doc-only. 26/26 tests pass; typecheck clean; marker guard clean.
Co-Authored-By: Claude Opus 4.7 <[email protected]>
---------
Co-authored-by: Haider <[email protected]>
Co-authored-by: Claude Opus 4.7 <[email protected]>1 parent 3eafa30 commit 930c0a6
2 files changed
Lines changed: 171 additions & 14 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 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
19 | 49 | | |
20 | 50 | | |
21 | 51 | | |
| |||
398 | 428 | | |
399 | 429 | | |
400 | 430 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
412 | 442 | | |
413 | | - | |
414 | | - | |
415 | | - | |
| 443 | + | |
416 | 444 | | |
417 | 445 | | |
418 | 446 | | |
| |||
| 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 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
0 commit comments