Skip to content

add moonshot/kimi-k2.6 to model registry - #26203

Merged
ishaan-berri merged 8 commits into
litellm_internal_stagingfrom
litellm_add_kimi_k26
Apr 22, 2026
Merged

add moonshot/kimi-k2.6 to model registry#26203
ishaan-berri merged 8 commits into
litellm_internal_stagingfrom
litellm_add_kimi_k26

Conversation

@ishaan-berri

Copy link
Copy Markdown
Contributor

Relevant Issues / Related PRs

Adds Kimi K2.6 (released April 20, 2026) to the LiteLLM model registry.

Pre-Submission Checklist

  • I have added tests in tests/litellm/
  • make test-unit passes for the modified tests

Changes

  • Added moonshot/kimi-k2.6 to model_prices_and_context_window.json and backup
  • Pricing: $0.60/M input, $2.80/M output (from https://platform.kimi.ai/docs/guide/kimi-k2-6-quickstart)
  • 262K context window, supports function calling, vision, and video input
  • Tests for model registry entry

Usage

import litellm

response = litellm.completion(
    model="moonshot/kimi-k2.6",
    messages=[{"role": "user", "content": "Hello!"}],
)

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR registers moonshot/kimi-k2.6 in both the primary and backup model price/context-window JSON files, and adds a unit test suite that reads exclusively from the local backup (no network calls). The JSON pricing was verified against the official Kimi pricing page and is correct. Note: the PR description quotes different prices than what is in the JSON — the JSON is correct; the description appears to be a stale draft and should be updated.

Confidence Score: 5/5

Safe 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.

Important Files Changed

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"
Loading

Reviews (4): Last reviewed commit: "fix: load kimi-k2.6 registry tests from ..." | Re-trigger Greptile

Comment on lines +22875 to +22888
"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
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Comment on lines +22875 to +22888
"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
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:00 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:00 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:00 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:00 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:00 — with GitHub Actions Inactive
@gitguardian

gitguardian Bot commented Apr 22, 2026

Copy link
Copy Markdown

️✅ 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.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 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.

@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:51 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:51 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:51 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:51 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 01:51 — with GitHub Actions Inactive
@mateo-berri
mateo-berri self-requested a review April 22, 2026 02:37

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 02:44 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 02:44 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 02:44 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 02:44 — with GitHub Actions Inactive
@ishaan-berri
ishaan-berri temporarily deployed to integration-postgres April 22, 2026 02:44 — with GitHub Actions Inactive

@mateo-berri mateo-berri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Awesome!

@ishaan-berri
ishaan-berri merged commit e6897f5 into litellm_internal_staging Apr 22, 2026
102 checks passed
@ishaan-berri
ishaan-berri deleted the litellm_add_kimi_k26 branch April 22, 2026 02:58
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants