Conversation
…roved editor reuse Add debouncing to rapid open calls, reuse existing diff editors to prevent visual flicker, and eliminate pre-opening files before diff commands. Changes include: 100ms debounce on open(), tracking current open path to dedupe concurrent calls, reordering close/show operations to avoid flash, and skipping unnecessary file pre-open that caused content flash before diff view appears. Also modernizes code with replaceAll and optional chaining.
Add support for Kimi-specific thinking parameter format by setting `thinking: { type: "enabled" }` when reasoning budget is enabled. Also preserve `reasoning_content` for Kimi/DeepSeek interleaved thinking in the message transformation.
…alls Fixes reasoning parameter format and content preservation for Kimi (Moonshot) models when tool calls are present. Changes include: - Use Kimi's native `thinking` parameter instead of OpenAI-style `reasoning` - Track and associate reasoning content with tool calls in stream processing - Preserve `reasoning_content` in conversation history for Moonshot provider
|
|
Hi @Saksham-245. Thanks for this PR! To maintain upstream compatibility (for now) we went with pulling in some changes from Roo upstream that are incompatible with this change since the moonshot provider is now using the the Vercel AI SDK. (see #5662 and RooCodeInc/Roo-Code#11063). This should fix reasoning properly as well so I'm closing this PR for now. I did make sure to top up your Kilo account with some credits to thank you for the effort though! It's highly appreciated! |
|
Thanks for the credits, @kevinvandijk That is very generous and I really appreciate the gesture. No worries about closing the PR. I only opened it because I was running into the issue myself, so I’m actually glad to hear that the upstream changes (and the Vercel AI SDK integration) will fix it properly. Thanks for the transparency! |
|
Hi @kevinvandijk this issue still exist in the latest update of the kilo code because now everything I say anything to Kimi it just says no tool call for just simple hi message and getting error again and again |
Context
Fixes #5454 - Kimi (Moonshot) reasoning parameter not working correctly with tool calls. The reasoning content was not being properly preserved and associated with tool calls in the conversation history.
Implementation
thinking: { type: "enabled" }parameter format when reasoning budget is enabledreasoning_contentfor Kimi/DeepSeek interleaved thinking in message transformationsreasoning_contentin conversation history for Moonshot providerreasoning_detailspropertyFiles Changed
How to Test
Checklist
Get in Touch
I'd love to have a way to chat about these changes if necessary. If you're in the Kilo Code Discord, my handle is
saksham25_.