Repository navigation
Conversation
- Add model mappings for gpt-5.3-codex, gpt-5.3-codex-spark, gpt-5.4, gpt-5.4-fast, gpt-5.4-mini, gpt-5.4-mini-fast, gpt-5.5, gpt-5.5-fast - Pattern-based model normalization for 5.3/5.4/5.5 families - Explicit gpt-5.5-pro rejection with clear error message - Update config templates, install script, docs, and tests - All 229 tests passing, all new models e2e verified
The ChatGPT/Codex backend serves the three named 5.6 tiers to ChatGPT Plus/Pro accounts, so they can run on subscription quota rather than metered api.openai.com credits. Verified against POST https://chatgpt.com/backend-api/codex/responses: gpt-5.6-sol HTTP 200 gpt-5.6-terra HTTP 200 gpt-5.6-luna HTTP 200 gpt-5.6 HTTP 400 'not supported when using Codex with a ChatGPT account' gpt-5.6-codex HTTP 400 (same) Only the three supported ids are mapped. The pattern-matching fallback in request-transformer checks the 5.6 tiers before the 5.5 branch, otherwise an unmapped id such as gpt-5.6-sol-pro would silently downgrade to gpt-5.5. 229 existing tests pass unchanged.
The ChatGPT/Codex backend rejects every "-fast" id with "The '<id>' model is not supported when using Codex with a ChatGPT account", so passing them through as-is produced a hard 400 rather than a faster request. Verified against POST https://chatgpt.com/backend-api/codex/responses on 2026-09-20 for gpt-5.4-mini-fast, gpt-5.6-{sol,terra,luna}-fast and gpt-6-astra-fast. Mapping them to their base model degrades a "-fast" selection to a working request instead of failing. This also covers opencode's openai provider default, which resolves to gpt-5.6-terra-fast and was therefore unusable. gpt-6-astra already had no -fast entry for this reason; this applies the same treatment to the 5.4, 5.5 and 5.6 families.
normalizeModel had no gpt-6 branch, so any astra id that missed MODEL_MAP fell through every gpt-5 pattern to the default return and was silently downgraded to gpt-5.1. The new check runs ahead of the gpt-5 patterns, so an unreleased tier such as "gpt-6-astra-pro" still resolves to gpt-6-astra rather than a wrong-family model. getReasoningConfig only allowed xhigh for 5.2, 5.2-codex and codex-max, so xhigh on the 5.6 tiers and on astra was quietly clamped to high. Both families accept it (astra: low/medium/high/xhigh/max; 5.6: none through max), so both are now included.
The lockfile still recorded 4.3.1 after the 4.4.0 release. Regenerating it also picks up esbuild 0.25.10 -> 0.27.7 and the current rollup platform binaries. No direct dependency ranges changed.
.omo/ and .serena/ hold local agent state (run-continuation data, Serena caches and memories). They are machine-specific and were surfacing as untracked on every status, where they risk being committed by accident. .opencode/ is already ignored for the same reason.
MODEL_MAP and normalizeModel have handled gpt-6-astra and gpt-5.6 sol/terra/luna since the 5.6 work, but neither was ever added to opencode-modern.json, so a fresh install exposed 14 models and none of the new ones. Users had to hand-edit their opencode.json to reach models the plugin already supported. Adds the four models with the effort ranges the backend actually accepts: astra low..max (no "none", which it rejects outright) and the 5.6 tiers none..max. Context follows the 5.5 generation convention at 400k. README now lists them, drops the stale "30 model presets" figure for the real 81 across 18 models, and documents that "-fast" ids normalize to their base model rather than selecting a distinct tier.
getModelFamily enumerated 5.2 through 5.5 and fell through to a gpt-5.1 catch-all, so gpt-5.6-sol/terra/luna and gpt-6-astra were each sent gpt_5_1_prompt.md while gpt-5.4 and gpt-5.5 correctly received gpt_5_2_prompt.md. The newest models were getting the oldest instructions. This is the same catch-all-default failure that silently downgraded astra in normalizeModel, one layer further down, so the comment now states the invariant: any family omitted here is served the oldest prompt in the repo. Found while reviewing upstream numman-ali#129, which extends ModelFamily for the 5.6 tiers. No new prompt files exist for 5.6 or 6, so they join the existing gpt-5.2 family rather than adding entries that point at the same file.
Port of upstream numman-ali#96 by @harshav167. parseSseStream only matched "data: " with a trailing space, parsed each line in isolation, and returned null unless it saw response.done or response.completed. A stream using "data:" without the space, or splitting one JSON object across several data lines, yielded nothing and the caller fell back to handing the raw SSE text to a JSON consumer. Now: both "data:" spellings are accepted, consecutive data lines are joined before parsing, a malformed event no longer poisons the events after it, and the payload falls back from finalResponse to the last response-like event to the last event, logging a warning when the final event is missing. Behaviour change: a stream with no response.done now returns the last JSON event rather than the original text, so that test was updated accordingly.
The legacy config still stopped at the 5.2 and 5.1 families, so anyone on
opencode v1.0.209 or below could not reach any model added since - 5.3
Codex, 5.4, 5.5, the 5.6 tiers or GPT-6 Astra - even though the plugin has
resolved them for several releases.
Adds 45 presets (22 -> 67) mirroring config/opencode-modern.json: effort
ranges and context limits match entry for entry, and gpt-6-astra omits
"none" because the backend rejects it.
Also adds the missing gpt-5.6-{sol,terra,luna}-max ids to MODEL_MAP. The
suffixed spelling is how the legacy config addresses a model, and only
gpt-6-astra-max existed; the 5.6 tiers resolved through the pattern-match
fallback instead of an explicit mapping.
The "-fast" ids are deliberately not carried into the legacy config. They
normalize to their base model, so legacy entries for them would be
duplicate presets.
normalizeModel only knew gpt-6-astra, so gpt-6-sol and gpt-6-luna matched no pattern, reached the default return and were sent as gpt-5.1 - which the backend now rejects outright: "The 'gpt-5.1' model is not supported when using Codex with a ChatGPT account." Both tiers are served (verified against POST https://chatgpt.com/backend-api/codex/responses on 2026-09-23), so the astra-only check becomes one rule that keeps any "gpt-6-<tier>" id and drops its suffix. "-fast" ids still resolve to their base model, which matters because gpt-6-{sol,luna}-fast are rejected just like gpt-6-astra-fast. A future GPT-6 tier resolves without another code change.
supportsNone only covered GPT-5.1 and GPT-5.2 general purpose, so "none" on gpt-6-sol and gpt-6-luna was silently lifted to "low". Both accept every effort from none to max (verified 2026-09-23); gpt-6-astra still rejects "none" and keeps the clamp.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the plugin up to the current Codex backend: GPT-6 (Astra, Sol, Luna) and the GPT-5.6 tiers (sol/terra/luna), plus three bugs found along the way. Every model claim here was verified against
POST https://chatgpt.com/backend-api/codex/responseswith a ChatGPT OAuth account rather than inferred.Relationship to #129: that PR covers the 5.6/5.5/5.4 mappings. This branch additionally adds GPT-6 Astra, fixes
-fasthandling, fixes the prompt-family fallback, and brings both config files to parity. Happy to rebase onto #129 if it lands first.Model support
MODEL_MAP,normalizeModel, and both config files.normalizeModelhad nogpt-6branch, so an astra id missing fromMODEL_MAPfell through everygpt-5pattern to the default return and was silently downgraded togpt-5.1. It is now checked ahead of thegpt-5patterns.gpt-5.1, which the backend now rejects outright (The 'gpt-5.1' model is not supported when using Codex with a ChatGPT account.). The astra-only check is now one rule that keeps anygpt-6-<tier>id and drops its suffix, so the next GPT-6 tier needs no code change.gpt-6-{sol,luna}-fastare rejected like astra's and resolve to their base model. Sol and Luna are not yet in the config presets or README.none..max, sononeis no longer lifted tolowfor them; astra still rejectsnoneand keeps the clamp.supportsXhighonly covered 5.2 / 5.2-codex / codex-max, soxhighon the 5.6 tiers and on astra was quietly clamped tohigh. Both families accept it (astralow..max, 5.6none..max).Fixes
-fastids returned a hard 400Six ids mapped to themselves and were passed through verbatim, but the backend rejects every one:
Confirmed 400 for
gpt-5.4-fast,gpt-5.4-mini-fast,gpt-5.5-fast,gpt-5.6-{sol,terra,luna}-fastandgpt-6-astra-fast. They now normalize to their base model, so a-fastselection degrades to a working request instead of failing.This also covers opencode's openai provider default, which resolves to
gpt-5.6-terra-fastand was therefore unusable out of the box.5.6 and GPT-6 were served the gpt-5.1 prompt
getModelFamilyenumerated 5.2 through 5.5 and fell through to agpt-5.1catch-all, so the newest models received the oldest instructions while 5.4 and 5.5 correctly receivedgpt_5_2_prompt.md.Since no 5.6 or 6 prompt files exist in this repo, they join the existing
gpt-5.2family rather than addingModelFamilyentries that point at the same files.SSE parsing — port of #96 by @harshav167
parseSseStreammatched onlydata:with a trailing space, parsed each line in isolation, and returned null unless it sawresponse.done. It now accepts bothdata:spellings, joins JSON split across several data lines, survives a malformed event mid-stream, and falls backfinalResponse→lastResponseLike→lastEvent.Behaviour change: a stream with no
response.donenow returns the last JSON event rather than the raw SSE text, so that test was updated accordingly.Config parity
opencode-legacy.jsonhad stopped at the 5.2/5.1 families, so nobody on opencode v1.0.209 or below could reach anything added since — 5.3 Codex, 5.4, 5.5, the 5.6 tiers or astra. Now 22 → 67 presets mirroringopencode-modern.jsonentry for entry.-fastids are deliberately not carried into the legacy config, since they normalize to their base model and would just be duplicate presets.README updated: model list, families, and the stale
30 model presetsfigure → the actual 81 presets across 18 models.Verification
tsc --noEmitcleanopencode run --model openai/gpt-6-lunaandopenai/gpt-6-solreturn 200 through the plugin (previously 400 naminggpt-5.1)MODEL_MAP— 0 unmappedNote
Two incidental commits are included: a
package-lock.jsonsync (it still recorded 4.3.1 after the 4.4.0 release) and a.gitignoreentry for local agent tooling directories. Happy to drop either if you'd rather keep this PR to the model changes.