feat(models): add Sonnet 1M and GPT-5.4 with usage warnings + recover…#22
Merged
feat(models): add Sonnet 1M and GPT-5.4 with usage warnings + recover…#22
Conversation
…y action - Register Sonnet 4.6 1M (sonnet[1m]) alongside existing Opus 1M. - Generalize the [1m] beta-header path so the same context-1m-2025-08-07 slug is sent for both Opus and Sonnet 1M models. - Add an amber "1M · higher cost" badge in the model selector to surface the pricing tradeoff before users opt in. - On rate-limit / context errors against a [1m] model, swap the toast action to "Switch to <base model>" — one click moves the sub-chat back to the 200K variant instead of leaving the user stuck. - Add gpt-5.4 and gpt-5.4-mini to Codex models and switch both the backend default (gpt-5.4/high) and frontend last-selected default to gpt-5.4. 5.3-codex stays available; existing user prefs are preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
[1m]suffix and enables the sharedcontext-1m-2025-08-07beta header for either Opus or Sonnet — same code path, no per-model branching.gpt-5.4/high) and the frontend last-selected default flipped fromgpt-5.3-codextogpt-5.4. 5.3-codex stays available; users with stored preferences are unaffected.[1m]id renders an amber "1M · higher cost" tag in the model selector with a tooltip, so users see the pricing tradeoff before opting in.Pricing for
gpt-5.4/gpt-5.4-miniwas already in pricing.ts so billing flows through unchanged.Files Changed
sonnet[1m],gpt-5.4,gpt-5.4-miniMODEL_ID_MAP+ flip Codex default[1m]suffix; threadmodelinto errordebugInfoDEFAULT_CODEX_MODEL→gpt-5.4/highTest plan
[claude] 1M context enabled for sonnet — ANTHROPIC_BETAS=…,context-1m-2025-08-07… / 1.0M contextgpt-5.3-codexselection — verify it is preserved (5.3 still in the list)[1m]model (or simulate by injectingRATE_LIMIT_SDKwith amodel: "sonnet[1m]"debugInfo) — verify the toast action reads "Switch to sonnet" and clicking it switches the sub-chatSources for the model decisions
gpt-5.4(no-codexsuffix)context-1m-2025-08-07beta for Sonnet 4.6low/medium/high/max(noxhigh— Opus 4.7 only)🤖 Generated with Claude Code