add moonshot/kimi-k2.6 to model registry - #26203
Conversation
|
|
Greptile SummaryThis PR registers Confidence Score: 5/5Safe to merge — only adds a new model registry entry with verified pricing; no existing behavior changed. All findings are P2. The JSON pricing values are correct per official Kimi docs. Both JSON files are in sync, the test suite makes no network calls, and all previously flagged missing fields (cache_read_input_token_cost, supports_reasoning) have been addressed. The only issue is a stale price in the PR description. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds moonshot/kimi-k2.6 entry with pricing verified correct against official Kimi docs ($0.95/M input, $4.00/M output, $0.16/M cache-hit); all capability flags included. |
| litellm/model_prices_and_context_window_backup.json | Backup JSON kept in sync with the primary; identical moonshot/kimi-k2.6 entry added at the correct alphabetical position. |
| tests/test_litellm/llms/moonshot/test_moonshot_chat_transformation.py | New TestKimiK26ModelRegistry class validates presence, pricing, context window, capabilities, and provider; uses GetModelCostMap.load_local_model_cost_map() — no network calls, satisfying the unit-test-only rule. |
Entity Relationship Diagram
%%{init: {'theme': 'neutral'}}%%
erDiagram
MODEL_REGISTRY {
string key "moonshot/kimi-k2.6"
float input_cost_per_token "9.5e-07 ($0.95/M)"
float output_cost_per_token "4e-06 ($4.00/M)"
float cache_read_input_token_cost "1.6e-07 ($0.16/M)"
int max_input_tokens "262144"
int max_output_tokens "262144"
int max_tokens "262144"
string mode "chat"
string litellm_provider "moonshot"
boolean supports_function_calling "true"
boolean supports_tool_choice "true"
boolean supports_vision "true"
boolean supports_video_input "true"
boolean supports_reasoning "true"
}
MODEL_REGISTRY ||--|| BACKUP_JSON : "mirrored in"
MODEL_REGISTRY ||--|| PRIMARY_JSON : "registered in"
Reviews (4): Last reviewed commit: "fix: load kimi-k2.6 registry tests from ..." | Re-trigger Greptile
| "moonshot/kimi-k2.6": { | ||
| "input_cost_per_token": 6e-07, | ||
| "litellm_provider": "moonshot", | ||
| "max_input_tokens": 262144, | ||
| "max_output_tokens": 262144, | ||
| "max_tokens": 262144, | ||
| "mode": "chat", | ||
| "output_cost_per_token": 2.8e-06, | ||
| "source": "https://platform.kimi.ai/docs/guide/kimi-k2-6-quickstart", | ||
| "supports_function_calling": true, | ||
| "supports_tool_choice": true, | ||
| "supports_video_input": true, | ||
| "supports_vision": true | ||
| }, |
There was a problem hiding this comment.
Missing
cache_read_input_token_cost vs kimi-k2.5
kimi-k2.5 (the predecessor) includes "cache_read_input_token_cost": 1e-07. If kimi-k2.6 also supports prompt caching (which is common for the Kimi K2 family), omitting this field means users won't benefit from cache-read cost savings when LiteLLM calculates cost. If cache reads are truly unsupported, a comment or zero-value entry would clarify intent.
| "moonshot/kimi-k2.6": { | ||
| "input_cost_per_token": 6e-07, | ||
| "litellm_provider": "moonshot", | ||
| "max_input_tokens": 262144, | ||
| "max_output_tokens": 262144, | ||
| "max_tokens": 262144, | ||
| "mode": "chat", | ||
| "output_cost_per_token": 2.8e-06, | ||
| "source": "https://platform.kimi.ai/docs/guide/kimi-k2-6-quickstart", | ||
| "supports_function_calling": true, | ||
| "supports_tool_choice": true, | ||
| "supports_video_input": true, | ||
| "supports_vision": true | ||
| }, |
There was a problem hiding this comment.
Missing
supports_reasoning flag vs kimi-k2.5
kimi-k2.5 is registered with "supports_reasoning": true. If kimi-k2.6 is also a reasoning/thinking model, this field should be included so that LiteLLM's supports_reasoning() helper and related routing logic recognize the capability correctly without a future patch.
…itellm_add_kimi_k26
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
mateo-berri
left a comment
There was a problem hiding this comment.
Could you fix the failing unit tests?
=========================== short test summary info ============================
FAILED tests/test_litellm/llms/moonshot/test_moonshot_chat_transformation.py::TestKimiK26ModelRegistry::test_kimi_k26_capabilities - KeyError: 'moonshot/kimi-k2.6'
FAILED tests/test_litellm/llms/moonshot/test_moonshot_chat_transformation.py::TestKimiK26ModelRegistry::test_kimi_k26_context_window - KeyError: 'moonshot/kimi-k2.6'
FAILED tests/test_litellm/llms/moonshot/test_moonshot_chat_transformation.py::TestKimiK26ModelRegistry::test_kimi_k26_in_model_cost_map - AssertionError: moonshot/kimi-k2.6 not found in model_cost
assert None is not None
FAILED tests/test_litellm/llms/moonshot/test_moonshot_chat_transformation.py::TestKimiK26ModelRegistry::test_kimi_k26_pricing - KeyError: 'moonshot/kimi-k2.6'
FAILED tests/test_litellm/llms/moonshot/test_moonshot_chat_transformation.py::TestKimiK26ModelRegistry::test_kimi_k26_provider - KeyError: 'moonshot/kimi-k2.6'
= 5 failed, 3466 passed, 73 skipped, 67 warnings, 10 rerun in 226.96s (0:03:46) =
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
* add moonshot/kimi-k2.6 to model registry * add moonshot/kimi-k2.6 to backup model registry * add tests for moonshot/kimi-k2.6 model registry * fix moonshot/kimi-k2.6 pricing and add reasoning support * fix moonshot/kimi-k2.6 pricing and add reasoning support in backup * update kimi-k2.6 tests: fix pricing, add tool_choice and reasoning checks * fix: load kimi-k2.6 registry tests from local backup instead of remote cost map
Relevant Issues / Related PRs
Adds Kimi K2.6 (released April 20, 2026) to the LiteLLM model registry.
Pre-Submission Checklist
tests/litellm/make test-unitpasses for the modified testsChanges
moonshot/kimi-k2.6tomodel_prices_and_context_window.jsonand backupUsage