Add GPT-5.4 and GPT-5.5 model support#126
Conversation
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>
|
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: 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>
|
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>
|
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. |
|
the goat |
|
codex oauth'd gpt5.4 and gpt5.5 are working as expected with all variants. |
Summary
MODEL_MAPand bothconfig/opencode-modern.json(variants) andconfig/opencode-legacy.json(flat presets).gpt-5.5-codex/gpt-5.4-codexmodel from OpenAI's side — sending those literal strings gets rejected with"model is not supported when using Codex with a ChatGPT account". So theOA-codexpresets (GPT 5.5 (OA-codex),GPT 5.4 (OA-codex)) are our own config-side choice — same underlyinggpt-5.5/gpt-5.4model as theOA-chatpresets, just with different system instructions and reasoning-effort defaults applied.resolveWireModel()inmodel-map.tssends the realgpt-5.4/gpt-5.5string on the wire regardless of which preset is selected.getReasoningConfiginlib/request/request-transformer.tsto derivexhigh/nonereasoning 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 newMODEL_MAP/config entries, not a change to the reasoning logic.lowreasoning effort (rather than inheriting the full model'shighdefault) since they're a new lightweight tier, but still allow explicitxhighopt-in.Note:
getModelFamilyinlib/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 thegpt-5.1prompt family and codex variants fall back to the genericcodexfamily, since I couldn't confirm whether dedicated prompt files exist yet inopenai/codexfor these releases. Worth revisiting if you know those files exist upstream.Test plan
npx tsc --noEmitpassesnpx vitest run— all pre-existing tests pass (5 pre-existing failures ininstall-script.test.tsare unrelated WindowsHOME/homedir()environment issues, reproducible onmainwithout this change)test/request-transformer.test.tscovering GPT-5.4/5.5 normalization, reasoning-effort behavior, and the wire-model resolution for the OA-codex presetsgpt-5.4,gpt-5.4-mini, andgpt-5.5(OA-chat) confirmed working; the-codexwire-model rejection was caught and fixed this way during that testing