Repository navigation
fix(model-catalog): declare above_32k cost fields on ModelInfo - #42856
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Head branch was modified
TLDR
Problem this solves:
rust-testfails on main since fix(models): sync openrouter prices from the models API #42832 added*_above_32k_tokensprice keysHow it solves it:
*_above_32k_tokenscost fields on the RustModelInfoUser Flow
Before: a contributor opening any PR against main sees the Rust check red for a change they did not make
rust-testfails inspec_parity::every_entry_round_trips_through_model_infowithopenrouter/qwen/qwen3-coder-plus key difference: {"input_cost_per_token_above_32k_tokens", ...}After: the same PR passes
rust-testrust-testis greenPre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<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 more@greptileaito re-request a review after pushing changes)Delays 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
The existing
spec_parity::every_entry_round_trips_through_model_infotest is the regression test: it round-trips every registry entry throughModelInfoand fails on any dropped key. It fails on main at b2b0b6c and passes with this change (cargo test -p litellm-model-catalog --test spec_parity, 4 passed). Split out of #42779 at the pricing owner's request so the registry PR stays data onlyType
🐛 Bug Fix
Link to Devin session: https://app.devin.ai/sessions/2de281eeae484d7e92904c8feaa36330
Open in Devin Desktop: https://app.devin.ai/desktop/session/2de281eeae484d7e92904c8feaa36330?variant=devin