Skip to content

Fix: Kimi K2.5 tool calls in thinking mode (#5748)#5750

Open
Githubguy132010 wants to merge 2 commits intoKilo-Org:mainfrom
Githubguy132010:fix/issue-5748-kimi-tool-calls-in-thinking
Open

Fix: Kimi K2.5 tool calls in thinking mode (#5748)#5750
Githubguy132010 wants to merge 2 commits intoKilo-Org:mainfrom
Githubguy132010:fix/issue-5748-kimi-tool-calls-in-thinking

Conversation

@Githubguy132010
Copy link
Contributor

@Githubguy132010 Githubguy132010 commented Feb 8, 2026

Fixes #5748

Context

Kimi K2.5 produces tool calls within thinking blocks that need to be executed. Currently, the OpenRouter provider does not detect or extract these tool calls when they appear inside the thinking content.

Implementation

Created a new module that detects and extracts tool calls from thinking text. The parser looks for tool call patterns within thinking blocks and extracts them so they can be properly executed. Modified the OpenRouter provider to use this parser when processing responses that contain thinking content.

Screenshots

N/A

How to Test

  1. Configure Kimi K2.5 via OpenRouter in Kilo Code
  2. Ask the model to perform a multi-step task that involves thinking
  3. Verify that tool calls within thinking blocks are properly detected and executed

Get in Touch

thomas07374

…ing from reasoning text with special markers
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@changeset-bot
Copy link

changeset-bot bot commented Feb 8, 2026

🦋 Changeset detected

Latest commit: ca2c72f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

Kimi K2.5 calls tools while thinking -- kilo code fails to interpret that

1 participant