fix(pricing): support GPT-5.5 tiered pricing#482
Open
IvGolovach wants to merge 2 commits intojunhoyeo:mainfrom
Open
fix(pricing): support GPT-5.5 tiered pricing#482IvGolovach wants to merge 2 commits intojunhoyeo:mainfrom
IvGolovach wants to merge 2 commits intojunhoyeo:mainfrom
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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
Why
LiteLLM pricing metadata is not limited to the existing above-200k shape. Newer OpenAI model entries can expose additional above-threshold fields such as above-272k token prices. Without reading those fields, Tokscale can undercount long-context GPT-5.5 usage and display GPT-5.5-family models less precisely in Wrapped summaries.
Changes
ModelPricingdeserialization with 128k, 256k, and 272k input/output tier fields, plus 272k cache-read pricing.main.Validation
bash scripts/check-version-coherence.shVersion coherence OK: 2.0.27cargo test --workspace -- --quiet1131 passed; 0 failed; 2 ignoredcargo test --workspace --all-features -- --quiet1131 passed; 0 failed; 2 ignoredcargo fmt --all --check/opt/homebrew/Cellar/rust/1.94.0/bin/cargo-clippy clippy --workspace --all-features -- -D warningsgit diff --check origin/main...HEADBranch Notes
junhoyeo/tokscale@main(edc8ed1fca49ec4a6936e4d4e15ca45dfd442b8eat validation time)IvGolovach:codex/gpt-5-5-pricing-support-current-mainorigin/mainRisk
Low. The pricing change keeps the existing base-price and above-200k paths intact, adds support for additional LiteLLM fields, and covers the new behavior with focused unit tests.