Repository navigation
fix(cost-map): drop the duplicate gemini/gemini-decision-1 entry that fails the root unit job on main - #51341
Conversation
Two PRs each added gemini/gemini-decision-1 to the price map, so main defines the key twice and test_price_map_has_no_duplicate_keys fails in the root unit job for every PR that merges main. The two entries hold the same fields and values, so this removes the earlier one and leaves the one JSON parsers already keep. The parsed map is unchanged.
PR overviewNo security issues were found in this pull request. Reviews
|
Merging this PR will not alter performance1 warning
Comparing |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
[Low impact] This PR appears safe to merge. SummaryRemoves the earlier duplicate
Reviews (1) · Last reviewed commit: "fix(cost-map): drop the duplicate gemini..." · Reviewed by Greptile |
|
Both parsed maps remain identical. The duplicate is removed from each file, and all 97 checks pass at e8e65a8 |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit e8e65a8. Configure here.
Handwritten 1-3 sentence description
Removes a duplicate entry in the cost map
Details
TLDR
Problem this solves:
gemini/gemini-decision-1twicetest_price_map_has_no_duplicate_keysfails in therootunit jobHow it solves it:
User Flow
Before: a contributor's PR goes red on a test their change never touched
rootunit check fails ontest_price_map_has_no_duplicate_keys[main]and[backup], naminggemini/gemini-decision-1After: the same push no longer trips that test
rootunit check passestest_price_map_has_no_duplicate_keysfor both filesPre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or moreDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
E2E exception at e8e65a8.
Scope: 26 lines deleted from
model_prices_and_context_window.jsonand the same 26 lines fromlitellm/model_prices_and_context_window_backup.json. No code changes.Rationale: #51215 and #51220 each added
gemini/gemini-decision-1. The two entries hold the same fields and values and differ only in key order and array formatting. JSON parsers keep the last occurrence, so the entry removed here was already being ignored, and the map every caller reads is the same before and after. There is no runtime behavior to show against a live proxy.The failure on main, as seen on an unrelated PR that merged main at 7461a99, is in this
rootjob, wheretest_price_map_has_no_duplicate_keys[main]and[backup]fail withassert ['gemini/gemini-decision-1'] == [].The check below reads both files at the base and at this PR's tip, lists duplicate keys, and compares the parsed maps.
dup_check.py
Both files also pass
python3 -m json.tool <file>at the tip, andcmpreports the two files identical to each other.I did not run
test_price_map_has_no_duplicate_keyslocally, because a fresh worktree needs a Rust build before the test module imports. This PR'srootjob is the run of that test.Type
🐛 Bug Fix
Caveats (if any)
Low
rootjob covers itFinal Attestation
Note
Low Risk
Configuration-only cleanup with no effective change to the parsed price map; fixes a duplicate-key test failure on main.
Overview
Removes the earlier duplicate
gemini/gemini-decision-1block from bothmodel_prices_and_context_window.jsonandlitellm/model_prices_and_context_window_backup.json, so the cost map no longer defines the same model key twice.The deleted entry was identical to the one still at the end of the file; standard JSON parsing already used the last definition, so pricing and capability metadata for this model are unchanged—only the redundant copy is gone.
This unblocks CI:
test_price_map_has_no_duplicate_keyson main was failing because both files listedgemini/gemini-decision-1twice.Reviewed by Cursor Bugbot for commit e8e65a8. Bugbot is set up for automated code reviews on this repo. Configure here.