feat(model_prices): add databricks kimi k3, databricks glm 5.2 and zai glm 5.3 - #38415
feat(model_prices): add databricks kimi k3, databricks glm 5.2 and zai glm 5.3#38415devin-ai-integration[bot] wants to merge 5 commits into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
|
PR #38415 (BerriAI/litellm, author devin-ai-integration[bot]) has no labels — the |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Greptile SummaryAdds Databricks registry entries for Kimi K3 and GLM 5.2, including pricing, context limits, and capability metadata.
Confidence Score: 4/5The PR appears safe to merge, with non-blocking improvements recommended for cache-write pricing coverage and metadata accuracy. The new registry entries are synchronized and their principal prices and limits are tested, but the cache-creation rate is not included in the dedicated assertions and the notes misidentify the fields used by production billing. Files Needing Attention: model_prices_and_context_window.json, litellm/model_prices_and_context_window_backup.json, tests/test_litellm/llms/databricks/test_databricks_cost_calculator.py
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds both model definitions with synchronized prices and capabilities; the new notes inaccurately describe which pricing fields drive billing. |
| litellm/model_prices_and_context_window_backup.json | Mirrors the primary registry entries exactly, including the same inaccurate calculation notes. |
| tests/test_litellm/llms/databricks/test_databricks_cost_calculator.py | Adds useful registry coverage but omits model-specific validation of the newly supplied cache-creation rates. |
Reviews (1): Last reviewed commit: "feat(model_prices): add databricks kimi ..." | Re-trigger Greptile
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Fixed in 111f776: the note now says billing reads the per-token dollar fields and the DBU fields are reference only |
|
Moot now: the added tests were dropped at the requester's ask, so the cache write assertion no longer exists here |
|
Closing in favor of the rolling registry PR #38207, which now carries these Databricks and Z.AI entries after re-verifying every rate against the provider pricing pages |
TLDR
Problem this solves:
How it solves it:
Note on the ticket title: the ticket said GLM 5.6, and the requester clarified they meant GLM 5.3. Databricks Foundation Model APIs do not host a GLM 5.3 endpoint yet,
databricks-glm-5-2is the only GLM they serve, so GLM 5.3 lands here as the Z.ai first-party model and the Databricks GLM entry stays at 5.2. When Databricks ships 5.3, that endpoint is a one-line follow-up.User Flow
Before: someone calling Databricks Kimi K3 or GLM 5.2, or Z.ai GLM 5.3, through the gateway can only pick them by hand, and every call logs as unknown with no spend
"model": "databricks-kimi-k3"After: all three models are known, so they appear in the dropdown and bill at published rates
databricks/databricks-kimi-k3,databricks/databricks-glm-5-2andzai/glm-5.3are selectable under the matching credential"model": "databricks-kimi-k3"Relevant issues
Linear ticket
Resolves LIT-6281
Pre-Submission checklist
uv run pytest tests/test_litellm/<your_test_file>.py -vScreenshots / Proof of Fix
UI before and after are coming from the requester, who has Databricks and Z.ai keys. Steps they are running, same steps on both commits:
git checkout <commit>, thenpython litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debugdatabricks-kimi-k3anddatabricks-glm-5-2glm-5.3in the dropdownBefore is 52b7bea, where the dropdowns do not list any of the three and a manually added deployment logs at $0.00. After is 111f776, where all three are listed and the request logs at real spend.
I have no Databricks token or Z.ai key here, so the run below is only the registry lookup the proxy does before it prices a request, captured at the merge base and at the PR tip with the same script.
Setup, run from the repo root:
Before (52b7bea)
python /tmp/lookup.pyAfter (111f776)
python /tmp/lookup.pyWhere the numbers come from
Databricks Foundation Model Serving DBU rates, https://www.databricks.com/product/pricing/foundation-model-serving, Kimi K3 at 42.857 input, 214.286 output and 4.286 cache read DBU per million tokens, GLM-5.2 at 20.000, 62.857 and 3.714, each multiplied by $0.070 per DBU to get the dollar fields
Same page's pay-per-token calculator with GLM 5.2 selected, $1.40 input, $4.40 output, $0.26 cache read, which is the DBU math above
Z.ai pricing, https://docs.z.ai/guides/overview/pricing, GLM-5.3 at $1.4 input, $0.26 cached input and $4.4 output per million tokens, with cached input storage free for a limited time
Type
🆕 New Feature
Caveats (if any)
Medium
cache_creation_input_token_costis 0 like the other zai entriesLow
max_completion_tokensup to 1,048,576 for Kimi K3 (default 131,072), and Z.ai documents 128K max output for GLM 5.2 and 5.3Final Attestation
Link to Devin session: https://app.devin.ai/sessions/5cdd9e479af8434890f62de0876b076a