Skip to content

Add GPT-5.4 and GPT-5.5 model support#126

Open
Mindrocket42 wants to merge 4 commits into
numman-ali:mainfrom
Mindrocket42:claude/serene-liskov-60e5f7
Open

Add GPT-5.4 and GPT-5.5 model support#126
Mindrocket42 wants to merge 4 commits into
numman-ali:mainfrom
Mindrocket42:claude/serene-liskov-60e5f7

Conversation

@Mindrocket42

@Mindrocket42 Mindrocket42 commented Jul 6, 2026

Copy link
Copy Markdown

Summary

  • Adds GPT-5.5 and GPT-5.4 model support (1.05M context, 128K output), plus new first-class GPT-5.4-mini / GPT-5.4-nano presets (400K context, 128K output), to MODEL_MAP and both config/opencode-modern.json (variants) and config/opencode-legacy.json (flat presets).
  • Important: confirmed via testing against the real ChatGPT backend that, unlike GPT-5.1/5.2, there is no separate gpt-5.5-codex/gpt-5.4-codex model from OpenAI's side — sending those literal strings gets rejected with "model is not supported when using Codex with a ChatGPT account". So the OA-codex presets (GPT 5.5 (OA-codex), GPT 5.4 (OA-codex)) are our own config-side choice — same underlying gpt-5.5/gpt-5.4 model as the OA-chat presets, just with different system instructions and reasoning-effort defaults applied. resolveWireModel() in model-map.ts sends the real gpt-5.4/gpt-5.5 string on the wire regardless of which preset is selected.
  • Generalizes getReasoningConfig in lib/request/request-transformer.ts to derive xhigh/none reasoning support from the parsed GPT-5.x point-release number instead of a hardcoded per-version boolean flag, since the same schema (introduced with 5.2) carries forward to later point releases. This means a future 5.x point release following the same schema only needs new MODEL_MAP/config entries, not a change to the reasoning logic.
  • Mini/nano default to low reasoning effort (rather than inheriting the full model's high default) since they're a new lightweight tier, but still allow explicit xhigh opt-in.
  • Bumps to 4.5.0 (package.json, CHANGELOG, OAuth success page banner) and updates the README model list/preset count (22 → 50).

Note: getModelFamily in lib/prompts/codex.ts (which selects the upstream Codex system-prompt file to fetch) was intentionally left unchanged — GPT-5.4/5.5 general purpose falls back to the gpt-5.1 prompt family and codex variants fall back to the generic codex family, since I couldn't confirm whether dedicated prompt files exist yet in openai/codex for these releases. Worth revisiting if you know those files exist upstream.

Test plan

  • npx tsc --noEmit passes
  • npx vitest run — all pre-existing tests pass (5 pre-existing failures in install-script.test.ts are unrelated Windows HOME/homedir() environment issues, reproducible on main without this change)
  • Added unit tests in test/request-transformer.test.ts covering GPT-5.4/5.5 normalization, reasoning-effort behavior, and the wire-model resolution for the OA-codex presets
  • Validated both config JSON templates parse and model counts match expectations
  • Verified against the real ChatGPT/Codex backend — gpt-5.4, gpt-5.4-mini, and gpt-5.5 (OA-chat) confirmed working; the -codex wire-model rejection was caught and fixed this way during that testing

Mindrocket42 and others added 2 commits July 6, 2026 09:42
Adds general-purpose, Codex, and (new) mini/nano presets for GPT-5.4
and GPT-5.5 across MODEL_MAP and both config templates. Generalizes
getReasoningConfig to derive xhigh/none support from the GPT-5.x point
release number instead of a hardcoded flag per version, so future 5.x
releases following the same reasoning schema won't need a code change
here - only new MODEL_MAP/config entries.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Confirmed via real ChatGPT-backend testing: unlike GPT-5.1/5.2, GPT-5.4
and GPT-5.5 have no distinct "-codex" backend deployment. Sending
"gpt-5.4-codex"/"gpt-5.5-codex" as the literal model name gets rejected
with "model is not supported when using Codex with a ChatGPT account".

Adds resolveWireModel() in model-map.ts to decouple our internal
normalized "family key" (still used to pick codex-flavored system
instructions and reasoning-effort defaults) from the literal model
string sent over the wire, which now collapses to the real "gpt-5.4"/
"gpt-5.5" model for these two presets.

Also relabels the GPT-5.4/5.5 config entries from "(OAuth)" /
"... Codex (OAuth)" to "(OA-chat)" / "(OA-codex)" so the UI reflects
that these are prompt/reasoning-defaults presets of the same
underlying model, not distinct model deployments.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Mindrocket42

Copy link
Copy Markdown
Author

Update: confirmed via real testing against the ChatGPT backend that `gpt-5.4-codex`/`gpt-5.5-codex` are not valid model names — the backend rejects them with:
```
Bad Request: {"detail":"The 'gpt-5.5-codex' model is not supported when using Codex with a ChatGPT account."}
```
Unlike GPT-5.1/5.2, GPT-5.4/5.5 apparently have no distinct `-codex` backend deployment — it's the same underlying model either way.

Pushed a follow-up commit that decouples our internal "family key" (used to pick codex-flavored system instructions + reasoning-effort defaults) from the literal wire model name via a new `resolveWireModel()` in `model-map.ts`. The `GPT 5.4 (OA-codex)`/`GPT 5.5 (OA-codex)` presets now correctly send `gpt-5.4`/`gpt-5.5` as the model field while keeping codex-oriented prompt/reasoning behavior. Also relabeled the config entries from `(OAuth)`/`... Codex (OAuth)` to `(OA-chat)`/`(OA-codex)` to make clear these are prompt presets of the same model, not distinct deployments.

Clarify that gpt-5.4-codex/gpt-5.5-codex are not separate backend
models - they're OA-chat/OA-codex presets of the same underlying
gpt-5.4/gpt-5.5 model, confirmed via testing against the real ChatGPT
backend.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Mindrocket42

Copy link
Copy Markdown
Author

Withdrawing this PR for now — testing surfaced enough inconsistencies in the GPT-5.4/5.5 model-naming assumptions that this needs more verification against the real ChatGPT/Codex backend before it's ready. Will reopen (or resubmit) once that's sorted.

Dense multi-clause bullets bury the key fact (OA-chat/OA-codex share
one backend model) where a quick vertical scan misses it. Table form
makes the model/context/reasoning/same-backend-model facts scannable
at a glance instead of requiring a full read of each line.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Mindrocket42

Copy link
Copy Markdown
Author

Reopening — confirmed this branch's exact code and config are what's synced and running locally: clean working tree at 892515f, dist rebuilt from it, and the global config's model list verified byte-identical to config/opencode-modern.json in this commit. gpt-5.4, gpt-5.4-mini, and gpt-5.5 (OA-chat) confirmed working against the real ChatGPT backend; the gpt-5.4-codex/gpt-5.5-codex wire-model rejection was caught and fixed as part of this same testing.

@Mindrocket42 Mindrocket42 reopened this Jul 6, 2026
@o7ux

o7ux commented Jul 9, 2026

Copy link
Copy Markdown

the goat

@o7ux

o7ux commented Jul 9, 2026

Copy link
Copy Markdown

codex oauth'd gpt5.4 and gpt5.5 are working as expected with all variants.
chatgpt oauth'd models returning "model is not supported when using Codex with a ChatGPT account". however, same rejection occurs verbatim in codex-cli when calling those models.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants