fix: add moonshot/kimi-k3 to the cost map on main - #37753
Conversation
models.litellm.ai and released litellm versions read model_prices_and_context_window.json from main at runtime, so Kimi K3 is missing from the hosted catalog even though the entry is in review for litellm_internal_staging in #37552. This copies that entry onto main so the catalog picks it up on its next fetch. Data only: the cost map and its backup copy, no code changes. Pricing matches Moonshot's published rates ($3/M input, $0.30/M cache read, $15/M output, 1,048,576-token context). The fireworks_ai and Azure Foundry kimi-k3 variants are separate work in #37512 and #37658; neither touches the native moonshot/kimi-k3 key.
|
bugbot run |
Greptile SummaryAdds the native
Confidence Score: 5/5The PR appears safe to merge; no actionable correctness, security, synchronization, or validation issue was identified. The two cost maps contain identical, valid entries using established fields, and the added pricing matches the documented rates while existing validation and fallback contracts remain intact.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds a schema-compatible Kimi K3 catalog entry with corroborated pricing and no identified actionable defect. |
| litellm/model_prices_and_context_window_backup.json | Mirrors the canonical Kimi K3 entry exactly so packaged fallback behavior remains synchronized. |
Reviews (1): Last reviewed commit: "fix: add moonshot/kimi-k3 to the cost ma..." | Re-trigger Greptile
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 ef1cde4. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
tin-berri
left a comment
There was a problem hiding this comment.
Small, low-risk, data-only cherry-pick — adds the moonshot/kimi-k3 cost-map entry to main (mirrors the entry already reviewed in #37552 for staging), no code changes. The one failing check, misc / Run tests (test_handle_completed_vertex_batch_computes_cost_usage_and_models, cost off by exactly 2x), is pre-existing and unrelated — confirmed the identical failure on main's current head as of 2026-08-19, nothing to do with this diff. Worth a separate look at some point (that 2x looks like a real bug, not flakiness) but not a blocker here. Approved.
TLDR
Problem this solves:
moonshot/kimi-k3is missing frommain's cost map, so models.litellm.ai doesn't list itlitellm_internal_stagingin feat(llm): add moonshot/kimi-k3 to model prices and context window map #37552, but the hosted map readsmainHow it solves it:
litellm_hotfix_*branch targetingmainmodel_prices_and_context_window.jsonplus the backup copy, nothing elseUser Flow
Before: a developer looking up Kimi K3 on the hosted model catalog finds nothing
azure_ai/FW-Kimi-K3; the nativemoonshot/kimi-k3is absentAfter: the same search shows the native Moonshot entry with real pricing
moonshot/kimi-k3appears with $3.00/M input, $0.30/M cache read, $15.00/M output, 1,048,576-token contextRelevant issues
Data-only hotfix that copies the cost map entry from #37552, which is in review for
litellm_internal_staging. models.litellm.ai and released litellm versions fetchmodel_prices_and_context_window.jsonfrom themainbranch at runtime, so the hosted map won't show Kimi K3 until the entry reachesmain. Same pattern as #30076. Pricing matches Moonshot's own published rates (platform.kimi.ai): $3.00/M cache-miss input, $0.30/M cache hit, $15.00/M output, over a 1,048,576-token context. Those are the direct-API rates themoonshot/prefix bills against, so resellers like OpenRouter quote different numbers and aren't the reference here. Thefireworks_ai/*andazure_ai/*kimi-k3 serverless variants are separate work that landed onlitellm_internal_stagingvia #37658, which superseded #37512; this PR only adds the nativemoonshot/kimi-k3key, which that changeset doesn't touchLinear ticket
Resolves LIT-5226
Pre-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 (for this data-only change, the same checks CI runs pass locally:jq empty,ci_cd/check_files_match.py,ci_cd/generate_model_prices_schema.py --check)@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
models.litellm.ai renders whatever
https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.jsonserves, so the proof below curls the same file the site fetches, at the merge base and at the PR tipBefore (007bd43)
curl -s https://raw.githubusercontent.com/BerriAI/litellm/007bd43cfb6eeeabe94d6aa77bd05dd3aa6aa1bf/model_prices_and_context_window.json | jq '."moonshot/kimi-k3"'After (ef1cde4)
curl -s https://raw.githubusercontent.com/BerriAI/litellm/ef1cde433ea7c6dd1515de06c6d0d748fae4a197/model_prices_and_context_window.json | jq '."moonshot/kimi-k3" | {input_cost_per_token, cache_read_input_token_cost, output_cost_per_token, max_input_tokens}'mainmapType
🐛 Bug Fix
Caveats (if any)
litellm_internal_staginginto this branch auto-merges the cost map with no conflict, so the staging promote is unaffectedmax_output_tokensmirrors the context window like the othermoonshot/kimi-*entries, since Moonshot publishes no separate output capFinal Attestation