Skip to content

feat(together_ai): add moonshotai/Kimi-K2.6 to model cost map - #30289

Closed
Chirag-Punia wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
Chirag-Punia:add-kimi-k2.6-together-ai
Closed

Chirag-Punia wants to merge 1 commit into
BerriAI:litellm_internal_stagingfrom
Chirag-Punia:add-kimi-k2.6-together-ai

Conversation

@Chirag-Punia

Copy link
Copy Markdown

Relevant issues

Fixes #27450

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have requested a Greptile review by commenting @greptileai and received a Confidence Score of at least 4/5 before requesting a maintainer review

Screenshots / Proof of Fix

Started a live proxy with the new model and queried model info as an end user would:

$ cat config.yaml
model_list:
  - model_name: kimi-k2.6
    litellm_params:
      model: together_ai/moonshotai/Kimi-K2.6
      api_key: "placeholder-no-calls-made"
general_settings:
  master_key: sk-1234

$ LITELLM_LOCAL_MODEL_COST_MAP=True litellm --config config.yaml --port 4000
$ curl -s http://localhost:4000/model/info -H "Authorization: Bearer sk-1234"

Response (filtered to the relevant fields):

{
  "model_name": "kimi-k2.6",
  "model_info": {
    "key": "together_ai/moonshotai/Kimi-K2.6",
    "max_input_tokens": 256000,
    "max_output_tokens": 256000,
    "input_cost_per_token": 1.2e-06,
    "cache_read_input_token_cost": 2e-07,
    "output_cost_per_token": 4.5e-06,
    "supports_function_calling": true,
    "supports_tool_choice": true,
    "supports_vision": true,
    "supports_reasoning": true,
    "mode": "chat"
  }
}

Cost calculation sanity check through litellm.cost_per_token with 1M prompt tokens and 1M completion tokens returns $1.20 and $4.50 respectively, matching the Together AI pricing page

Type

🆕 New Feature

Changes

Adds the together_ai/moonshotai/Kimi-K2.6 entry to model_prices_and_context_window.json and its mirrored copy litellm/model_prices_and_context_window_backup.json. Values are from the Together AI model page (https://www.together.ai/models/kimi-k26): 256K context window, $1.20 per 1M input tokens, $0.20 per 1M cached input tokens, $4.50 per 1M output tokens, with function calling, tool choice, vision and reasoning support. The entry mirrors the existing Kimi-K2.5 entry directly above it

This is a data-only change so no new test was added; the existing cost map schema validation (tests/test_litellm/test_utils.py::test_aaamodel_prices_and_context_window_json_is_valid) passes locally against the updated files

Adds pricing and context window for together_ai/moonshotai/Kimi-K2.6 to the cost map and its backup copy. Values are from https://www.together.ai/models/kimi-k26: 256K context, $1.20 per 1M input tokens, $0.20 per 1M cached input tokens, $4.50 per 1M output tokens, with function calling, tool choice, vision and reasoning support, mirroring the existing Kimi-K2.5 entry
@Chirag-Punia

Copy link
Copy Markdown
Author

@greptileai

@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 Jun 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds together_ai/moonshotai/Kimi-K2.6 to the model cost map in both JSON files. Pricing ($1.20/1M input, $0.20/1M cached, $4.50/1M output), the 256K context window, the API endpoint identifier, and the capability flags (function calling, tool choice, vision, reasoning) are all confirmed against the Together AI model page.

  • Both model_prices_and_context_window.json and its backup are updated consistently with identical entries.
  • The new entry follows the same structure as the adjacent together_ai/moonshotai/Kimi-K2.5 entry and correctly adds cache_read_input_token_cost since Together AI explicitly prices prompt caching for K2.6.

Confidence Score: 5/5

Pure data addition to two JSON files; no logic, routing, or auth code is touched

All three numeric values (input, cached, output cost per token), the context window, the API endpoint name, and every capability flag were cross-checked against the Together AI pricing page and model card. Both JSON files are updated identically and the insertion is placed correctly between the existing K2.5 and K2-Instruct-0905 entries. No functional code is changed.

No files require special attention

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds together_ai/moonshotai/Kimi-K2.6 entry with pricing and capabilities verified against the Together AI pricing page
litellm/model_prices_and_context_window_backup.json Mirror of the main JSON: identical together_ai/moonshotai/Kimi-K2.6 entry added in the correct position

Reviews (1): Last reviewed commit: "feat(together_ai): add moonshotai/Kimi-K..." | Re-trigger Greptile

@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds together_ai/moonshotai/Kimi-K2.6 to both cost-map JSON files with 256K context, $1.20/$4.50 per 1M input/output tokens, $0.20/1M cached-read tokens, and capability flags for function calling, tool choice, vision, and reasoning.

  • The pricing values and context window are backed by the PR author's live proxy verification and match the Together AI pricing page.
  • The entry includes cache_read_input_token_cost (implying prompt caching is available), but supports_prompt_caching: true is absent — the parallel tensormesh/moonshotai/Kimi-K2.6 entry already carries this flag and it should be consistent.

Confidence Score: 4/5

Safe to merge — purely additive data change with no logic modifications; one missing capability flag worth addressing before shipping.

The change is a well-evidenced, data-only addition to the cost map. The single finding — supports_prompt_caching absent despite a cache_read_input_token_cost being set — would cause litellm.supports_prompt_caching to return falsy for this model, but it doesn't break existing functionality; it only leaves a new feature undiscoverable. Everything else (pricing values, context window, capability flags, dual-file sync) looks correct.

Both JSON files need "supports_prompt_caching": true added to the new entry.

Important Files Changed

Filename Overview
model_prices_and_context_window.json Adds together_ai/moonshotai/Kimi-K2.6 entry with correct pricing ($1.20/$4.50 per 1M tokens), 256K context, and capability flags — but is missing supports_prompt_caching: true despite having cache_read_input_token_cost.
litellm/model_prices_and_context_window_backup.json Mirror of the primary JSON — same new entry added, same missing supports_prompt_caching flag.

Reviews (2): Last reviewed commit: "feat(together_ai): add moonshotai/Kimi-K..." | Re-trigger Greptile

Comment on lines +31922 to +31936
"together_ai/moonshotai/Kimi-K2.6": {
"cache_read_input_token_cost": 2e-07,
"input_cost_per_token": 1.2e-06,
"litellm_provider": "together_ai",
"max_input_tokens": 256000,
"max_output_tokens": 256000,
"max_tokens": 256000,
"mode": "chat",
"output_cost_per_token": 4.5e-06,
"source": "https://www.together.ai/models/kimi-k26",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_reasoning": 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 The entry includes cache_read_input_token_cost (indicating the model bills for cached-token reads), but supports_prompt_caching is not set. The equivalent tensormesh/moonshotai/Kimi-K2.6 entry already carries "supports_prompt_caching": true. Without this flag, litellm.supports_prompt_caching("together_ai/moonshotai/Kimi-K2.6") returns None (falsy), so downstream code that gates caching on that check would silently skip it for this model.

Suggested change
"together_ai/moonshotai/Kimi-K2.6": {
"cache_read_input_token_cost": 2e-07,
"input_cost_per_token": 1.2e-06,
"litellm_provider": "together_ai",
"max_input_tokens": 256000,
"max_output_tokens": 256000,
"max_tokens": 256000,
"mode": "chat",
"output_cost_per_token": 4.5e-06,
"source": "https://www.together.ai/models/kimi-k26",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_reasoning": true
},
"together_ai/moonshotai/Kimi-K2.6": {
"cache_read_input_token_cost": 2e-07,
"input_cost_per_token": 1.2e-06,
"litellm_provider": "together_ai",
"max_input_tokens": 256000,
"max_output_tokens": 256000,
"max_tokens": 256000,
"mode": "chat",
"output_cost_per_token": 4.5e-06,
"source": "https://www.together.ai/models/kimi-k26",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_reasoning": true
},

Comment on lines +31882 to +31896
"together_ai/moonshotai/Kimi-K2.6": {
"cache_read_input_token_cost": 2e-07,
"input_cost_per_token": 1.2e-06,
"litellm_provider": "together_ai",
"max_input_tokens": 256000,
"max_output_tokens": 256000,
"max_tokens": 256000,
"mode": "chat",
"output_cost_per_token": 4.5e-06,
"source": "https://www.together.ai/models/kimi-k26",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_reasoning": 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 Same supports_prompt_caching flag is missing in the backup file's copy of this entry — should be kept in sync with the primary JSON fix above.

Suggested change
"together_ai/moonshotai/Kimi-K2.6": {
"cache_read_input_token_cost": 2e-07,
"input_cost_per_token": 1.2e-06,
"litellm_provider": "together_ai",
"max_input_tokens": 256000,
"max_output_tokens": 256000,
"max_tokens": 256000,
"mode": "chat",
"output_cost_per_token": 4.5e-06,
"source": "https://www.together.ai/models/kimi-k26",
"supports_function_calling": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_reasoning": true
},
"together_ai/moonshotai/Kimi-K2.6": {
"cache_read_input_token_cost": 2e-07,
"input_cost_per_token": 1.2e-06,
"litellm_provider": "together_ai",
"max_input_tokens": 256000,
"max_output_tokens": 256000,
"max_tokens": 256000,
"mode": "chat",
"output_cost_per_token": 4.5e-06,
"source": "https://www.together.ai/models/kimi-k26",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_reasoning": true
},

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level

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.

Add "Kimi-K2.6" in "model_prices_and_context_window.json" for Provider Together AI

2 participants