Skip to content

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

Closed
ishaan-berri wants to merge 3 commits intomainfrom
worktree-golden-yawning-hammock
Closed

add moonshot/kimi-k2.6 to model registry#26200
ishaan-berri wants to merge 3 commits intomainfrom
worktree-golden-yawning-hammock

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.

@codspeed-hq
Copy link
Copy Markdown
Contributor

codspeed-hq Bot commented Apr 21, 2026

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing worktree-golden-yawning-hammock (240c061) with main (26fcbc9)

Open in CodSpeed

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 21, 2026

Greptile Summary

This PR adds moonshot/kimi-k2.6 to the LiteLLM model registry with pricing ($0.60/M input, $2.80/M output), a 262K context window, and capability flags for function calling, vision, and video input. Both JSON files are kept in sync and the accompanying tests correctly read from the in-memory model cost map without making real network calls.

Confidence Score: 5/5

Safe to merge; all findings are P2 clarification items on optional registry fields

The core change is a well-formed JSON model registry addition with correct pricing math and a thorough test suite. The two open questions (missing cache_read_input_token_cost and supports_reasoning compared to kimi-k2.5) are P2 — they won't break routing but could silently under-report capabilities or miss a caching discount. No logic errors, security issues, or test-integrity problems detected.

model_prices_and_context_window.json — verify cache pricing and reasoning support against official kimi-k2.6 docs

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds moonshot/kimi-k2.6 entry; missing cache_read_input_token_cost and supports_reasoning compared to sibling kimi-k2.5 model
litellm/model_prices_and_context_window_backup.json Backup JSON mirrors main JSON — same entry with same omissions as above
tests/test_litellm/llms/moonshot/test_moonshot_chat_transformation.py Adds TestKimiK26ModelRegistry with 5 unit tests verifying pricing, context window, capabilities, and provider — no real network calls, complies with test rules

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[litellm.completion\nmodel='moonshot/kimi-k2.6'] --> B[model_prices_and_context_window.json\nlookup]
    B --> C{Entry found?}
    C -- Yes --> D[Resolve litellm_provider\n= 'moonshot']
    D --> E[Apply pricing\n$0.60/M input · $2.80/M output]
    D --> F[Apply limits\n262K ctx · 262K output]
    D --> G[Enable capabilities\nfunction calling · vision · video]
    E & F & G --> H[Route to Moonshot API]
    C -- No --> I[KeyError / fallback]
Loading

Reviews (1): Last reviewed commit: "add tests for moonshot/kimi-k2.6 model r..." | 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

Every other moonshot/kimi-k2* model in the registry includes cache_read_input_token_cost (e.g., kimi-k2.5 has 1e-07, kimi-k2-0905-preview has 1.5e-07). If prompt caching is supported for kimi-k2.6, omitting this field means LiteLLM will never apply the discounted rate, silently over-billing users on cached tokens. If the model genuinely doesn't support caching yet, a brief source note explaining that would help future readers.

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 supports_reasoning not set — verify vs kimi-k2.5

moonshot/kimi-k2.5 (the predecessor in the registry) has "supports_reasoning": true, but this entry omits it. If kimi-k2.6 also surfaces a <thinking> block or extended reasoning output, leaving this flag out will prevent LiteLLM from routing reasoning-aware handling. Please verify against the official docs and add the flag if applicable.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

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 21, 2026 23:09 — with GitHub Actions Inactive
@ishaan-berri ishaan-berri temporarily deployed to integration-postgres April 21, 2026 23:09 — with GitHub Actions Inactive
@ishaan-berri ishaan-berri temporarily deployed to integration-postgres April 21, 2026 23:09 — with GitHub Actions Inactive
@ishaan-berri
Copy link
Copy Markdown
Contributor Author

Refiling with correct base branch (litellm_internal_staging) and branch naming convention.

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.

2 participants