fix: correct Moonshot params to match Kimi's API docs - #168
Open
brunobuddy wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
brunobuddy
force-pushed
the
drop-params-audit
branch
from
July 30, 2026 07:56
46531c9 to
fdd0e6c
Compare
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
brunobuddy
force-pushed
the
drop-params-audit
branch
from
July 30, 2026 07:59
fdd0e6c to
11b5fce
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💭 Why
The Moonshot entries disagreed with Kimi's chat API reference in both directions.
kimi-k3listedthinking.type, which that model rejects. Thekimi-k2.7-codefamily omittedthinking.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.typereplaced byreasoning_effort(low/high/max, default max). K3 always thinks and takes no thinking object.kimi-k2.7-codeand-highspeed(4 files): addthinking.type. Onlyenabledis accepted,disablederrors.kimi-k2.6(2 files): addthinking.keep(all/null, default null).kimi-k2.5: add the documentedenableddefault onthinking.type.Params from
ChatRequestCommon, added to all 8api_keyentries:stop(up to 5 sequences, 32 bytes each)tool_choice(auto/none/required, default auto)logprobs(boolean, default false)top_logprobs(0-20), gated onlogprobs: trueviaapplicability.only👤 For users
ParamsOf<"moonshot/kimi-k3">now typesreasoning_effortinstead ofthinking.type. Breaking for anyone pinned to the old shape, but the old shape was wrong.🔧 For operators
guard:paramsfails on this PR by design. It flags thethinking.typeremoval fromkimi-k3. The removal is intended, so this needs theallow-param-removallabel 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
ChatRequestCommonparams. 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.predictionis documented too but left out. It carries predicted output content rather than tuning generation, so it reads as request data, not a knob.