fix(model_prices): correct cache read pricing for Gemini flash latest and preview aliases - #38215
Closed
Alphaxiaoteng wants to merge 1 commit into
Closed
Conversation
… and preview aliases
Alphaxiaoteng
requested review from
mateo-berri,
ryan-crabbe-berri and
yuneng-berri
as code owners
August 25, 2026 15:27
Contributor
|
Too many files changed for review (388 files, 100 file limit). Bypass the limit by tagging |
|
Alpha Intelligence seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Contributor
|
Superseded by the rolling registry PR #38207, which carries these values re-verified against the provider's own pricing page/API (DeepInfra publishes $/token and 262144 context for the Kimi K2.5 and K2.7 Code entries). Maintainers asked for a single open model-pricing PR at a time. |
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.
Fixes #38062
Root Cause
Several Gemini 2.5 / Flash aliases in
model_prices_and_context_window.json(and its backup) still billed cache reads at 25% of input cost (7.5e-08/2.5e-08), which was the legacy Gemini 2.0 rate, instead of the 10% rate (3e-08/1e-08) matching Google's official Gemini 2.5 Flash pricing:gemini/gemini-flash-latest(7.5e-08->3e-08)gemini/gemini-flash-lite-latest(2.5e-08->1e-08)gemini/gemini-2.5-flash-preview-09-2025(7.5e-08->3e-08)gemini-2.5-flash-preview-09-2025(7.5e-08->3e-08)gemini/gemini-2.5-flash-lite-preview-06-17(2.5e-08->1e-08)gemini-2.5-flash-lite-preview-06-17(2.5e-08->1e-08)Changes
cache_read_input_token_costinmodel_prices_and_context_window.jsonandlitellm/model_prices_and_context_window_backup.jsonto 10% ofinput_cost_per_token.tests/test_litellm/llms/gemini/test_cost_calculator.pycovering all corrected model aliases.Verification & Test Evidence
pytest tests/test_litellm/llms/gemini/test_cost_calculator.py-> Passed (19 passed, exit code 0)pytest tests/test_litellm/test_model_prices_schema.py-> Passed (21 passed, exit code 0)python ci_cd/check_files_match.py-> Passed (exit code 0)python ci_cd/generate_model_prices_schema.py --check-> Passed (exit code 0)ruff check --config ruff-tests.toml tests/test_litellm/llms/gemini/test_cost_calculator.py-> Passed (exit code 0)