🤖 fix: apply OpenAI's GPT-5.6 Luna and Terra price cut - #3766
Open
ibetitsmike wants to merge 1 commit into
Open
Conversation
Luna drops 80% ($1 -> $0.20/M input, $6 -> $1.20/M output) and Terra drops 20% ($2.50 -> $2/M input, $15 -> $12/M output). Cached-read, cache-write, and >272K long-context rates are derived from the new base rates using the same multipliers already documented for the family. These models are hand-maintained in models-extra.ts because the GPT-5.6 family is not in upstream LiteLLM, so scripts/update_models.ts cannot pick this up.
Contributor
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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
Applies OpenAI's July 30, 2026 API price cut for GPT-5.6 Luna (80% cheaper) and Terra (20% cheaper) to Mux's hand-maintained model pricing table. Sol is unchanged.
Background
OpenAI lowered Luna and Terra API pricing effective July 30, 2026: Terra to $2/M input and $12/M output, Luna to $0.20/M input and $1.20/M output.
Mux cannot pick this up automatically.
scripts/update_models.tssyncs pricing from upstream LiteLLM intomodels.json, but the entire GPT-5.6 family is absent from LiteLLM, so Sol/Terra/Luna live inmodels-extra.ts, the hand-maintained fallback table. Running the sync script is a no-op for these models, which left every Luna and Terra cost readout in the app overstated by up to 5x.Implementation
Base input/output rates come straight from OpenAI's announcement. The derived rates follow the multipliers already documented for this family in
models-extra.ts:Context window (1.05M), max output (128K), and the 272K tier boundary are unchanged.
knownModels.tscarried the old rates in comments next to each model definition; those are updated so the two sources do not disagree.Validation
The Luna cost-math case in
displayUsage.test.tsneeded a precision fix beyond the rate swap. All four expected costs now land near or below 1e-3, wheretoBeCloseTo's default precision of 2 passes for any value within 0.005, so the assertions would have held even against the old (5x higher) rates. They are pinned to precision 10 to keep the test meaningful.Confirmed no Storybook story renders GPT-5.6 per-token prices, so no visual baselines shift.
Risks
Low blast radius: data-only change to a lookup table, no logic touched.
One user-visible side effect worth calling out: costs are recomputed from stored token counts at display time via
createDisplayUsage/recomputeUsageCostsrather than read from a persisted dollar amount. Historical Luna and Terra sessions will therefore re-price at the new lower rates in the costs UI. That is consistent with how every previous pricing correction in this table has behaved.Generated with
mux• Model:anthropic:claude-opus-5• Thinking:max