fix(codex): price Flex tier turns and the gpt-reserve / gpt-5.3-spark ids - #1642
Merged
Merged
Conversation
… ids Flex turns (service_tier "flex") billed at standard rates. They now bill at the model's published `<rate>_flex` rates, carried as an optional seventh snapshot slot (only the flex fields were added to the bundled snapshot). A model without flex rates still bills Flex at standard. gpt-reserve (Luna Reserve) prices as GPT-5.6 Luna and gpt-5.3-spark as GPT-5.3 Codex Spark; both showed $0 with an unknown-model warning.
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.
Two Codex pricing gaps.
Flex tier.
service_tier: "flex"was priced at the standard rate. It now uses LiteLLM's*_flexrates per bucket (exact rates, not a multiplier: gpt-5.4 cached input is $0.13/M, not half of $0.25), including the above-272k tier. A model without flex rates stays at standard. The bundled snapshot gains an optional 7th slot on the 125 rows that publish flex rates; standard rates are byte-identical.Unpriced ids.
gpt-reserve(Luna Reserve) now prices as gpt-5.6-luna with its own label. The backend picks the real model and rollouts don't record it, so the cost is marked estimated (GPT-6 Luna, half the price, became the client fallback on 22 Sep).gpt-5.3-sparkmaps to gpt-5.3-codex-spark.Both showed $0 with an unknown-model warning before.
Caches: codex v21, codex parse suffix, daily v55, pricing cache schema v7. No PENDING_REDERIVE: call counts don't change.
Checked: lifetime audit on real history is identical to the cent (no flex or reserve calls in it). A synthetic flex/priority/default/long-context fixture matches hand-computed costs; priority and default are unchanged vs main; cold parse equals warm cache.