Parameter Comparison
When
temperature is close to 0, n can only be 1. Otherwise, the API returns invalid_request_error.Kimi K2.7 Code series β thinking Parameter
Thekimi-k2.7-code series includes kimi-k2.7-code and its high-speed variant kimi-k2.7-code-highspeed; the two are the same model with identical parameter constraints (including the table above and the thinking behavior) and differ only in output speed (referred to collectively as kimi-k2.7-code below).
kimi-k2.7-code is code-focused, and all parameter constraints except thinking are identical to kimi-k2.6. Unlike kimi-k2.6, its thinking is always on and cannot be disabled (passing {"type": "disabled"} errors), and Preserved Thinking is always on (thinking.keep is treated as "all" whether omitted or set to "all"; any other invalid value errors). So you do not need to pass the thinking parameter β just switch the model, and the model always emits reasoning_content. For details, see Using Thinking Models.
Kimi K2.6 β thinking Parameter
Kimi K2.6 supports thethinking parameter to control whether deep thinking is enabled. Accepts {"type": "enabled"} or {"type": "disabled"}.
Since the OpenAI SDK doesnβt have a native thinking parameter, use extra_body: