Skip to content

[Fix] Kimi Code sends incorrect reasoning parameters for subscription models - #1341

Draft
zoomote[bot] wants to merge 1 commit into
mainfrom
fix/kimi-code-model-protocols-0sm74zl5u0449
Draft

[Fix] Kimi Code sends incorrect reasoning parameters for subscription models#1341
zoomote[bot] wants to merge 1 commit into
mainfrom
fix/kimi-code-model-protocols-0sm74zl5u0449

Conversation

@zoomote

@zoomote zoomote Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

​Opened on behalf of @taltas. Follow up by mentioning @roomote, in the web UI, or in Discord.

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/max reasoning effort with high as the default, and omits temperature. K2.7 Code sends preserved thinking instead of reasoning_effort and 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 test and pnpm check-types from 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

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Visual Snapshot (UI changes only): Not applicable; this changes provider request behavior without changing extension UI.
  • Documentation Impact: Documentation is updated in Zoo-Code-Docs PR [Fix] Windows CI tests flake and unit-test cache stays cold #43.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

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

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/api/providers/kimi-code.ts 83.33% 0 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

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.

1 participant