[Fix] Kimi Code sends incorrect reasoning parameters for subscription models - #1341
Draft
zoomote[bot] wants to merge 1 commit into
Draft
[Fix] Kimi Code sends incorrect reasoning parameters for subscription models#1341zoomote[bot] wants to merge 1 commit into
zoomote[bot] wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Related GitHub Issue
Related: #1316
Follow-up to: #1325
Description
Kimi Code now applies protocol-specific request behavior for subscription and API-key models. K3 keeps the direct API's 131K output default, uses
low/high/maxreasoning effort withhighas the default, and omits temperature. K2.7 Code sends preserved thinking instead ofreasoning_effortand carries reasoning context through tool-result continuations.The generic OpenAI-compatible handler exposes narrow request and message-conversion hooks so Kimi Code can customize these fields without duplicating the full request pipeline. Discovered server capacity still overrides local fallback metadata without guessing a protocol for unknown future model IDs.
Test Procedure
Run
pnpm testandpnpm check-typesfrom the repository root. The provider and fetcher suites include wire-level coverage for all four model IDs, temperature omission, custom effort, OAuth retry, server metadata overrides, and preserved thinking across a tool-result plus trailing-text continuation.Pre-Submission Checklist
Visual Snapshots
Not applicable.
Videos (interaction / animation only)
Not applicable.
Documentation Updates
See Zoo-Code-Org/Zoo-Code-Docs#43.
Additional Notes
PR #1325 correctly fixes Kimi K3 through OpenRouter, whose 32,768-token upstream cap differs from the direct Kimi Code API. This PR intentionally keeps the direct provider's 131,072-token output default.
Related PRs
Get in Touch
@taltas