Skip to content

fix: correct Moonshot params to match Kimi's API docs - #168

Open
brunobuddy wants to merge 2 commits into
mainfrom
drop-params-audit
Open

fix: correct Moonshot params to match Kimi's API docs#168
brunobuddy wants to merge 2 commits into
mainfrom
drop-params-audit

Conversation

@brunobuddy

@brunobuddy brunobuddy commented Jul 30, 2026

Copy link
Copy Markdown
Member

💭 Why

The Moonshot entries disagreed with Kimi's chat API reference in both directions. kimi-k3 listed thinking.type, which that model rejects. The kimi-k2.7-code family omitted thinking.type, which it requires. And no Kimi entry carried the four params Moonshot documents as accepted by every model.

✨ What changed

Reasoning controls:

  • kimi-k3: thinking.type replaced by reasoning_effort (low/high/max, default max). K3 always thinks and takes no thinking object.
  • kimi-k2.7-code and -highspeed (4 files): add thinking.type. Only enabled is accepted, disabled errors.
  • kimi-k2.6 (2 files): add thinking.keep (all/null, default null).
  • kimi-k2.5: add the documented enabled default on thinking.type.

Params from ChatRequestCommon, added to all 8 api_key entries:

  • stop (up to 5 sequences, 32 bytes each)
  • tool_choice (auto/none/required, default auto)
  • logprobs (boolean, default false)
  • top_logprobs (0-20), gated on logprobs: true via applicability.only

👤 For users

ParamsOf<"moonshot/kimi-k3"> now types reasoning_effort instead of thinking.type. Breaking for anyone pinned to the old shape, but the old shape was wrong.

🔧 For operators

guard:params fails on this PR by design. It flags the thinking.type removal from kimi-k3. The removal is intended, so this needs the allow-param-removal label before it can merge.

📝 Notes

Source: https://platform.kimi.ai/docs/api/chat
Found while diffing the catalog against LiteLLM's drop_params (BerriAI/litellm#35217).
The 3 subscription entries do not get the ChatRequestCommon params. That table documents the REST API, and I have no evidence the Kimi subscription surface exposes them. Happy to add them if you know otherwise.
prediction is documented too but left out. It carries predicted output content rather than tuning generation, so it reads as request data, not a knob.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modelparams.dev Ready Ready Preview Jul 30, 2026 8:15am

Request Review

The Kimi entries disagreed with Moonshot's chat API reference.

- kimi-k3: replace thinking.type with reasoning_effort (low/high/max,
  default max). K3 always thinks and rejects the thinking object.
- kimi-k2.7-code and -highspeed: add thinking.type. Only "enabled" is
  accepted; "disabled" returns an error.
- kimi-k2.6: add thinking.keep (all/null, default null).
- kimi-k2.5: add the documented "enabled" default on thinking.type.

Ref: https://platform.kimi.ai/docs/api/chat
Moonshot documents stop, tool_choice, logprobs and top_logprobs in
ChatRequestCommon, meaning every model takes them. The catalog listed
none of the four.

Added to the eight api_key entries. The three subscription entries are
left alone: the reference covers the REST API, and there is no evidence
the Kimi subscription surface exposes these knobs.

top_logprobs carries an applicability rule because Moonshot requires
logprobs to be true when it is used.

Ref: https://platform.kimi.ai/docs/api/chat
@brunobuddy brunobuddy changed the title fix: correct Kimi reasoning params to match Moonshot's API fix: correct Moonshot params to match Kimi's API docs Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model Add a model that's missing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant