PSA Kimi K2 Thinking seems to currently be broken for most agents because of tool calling within it's thinking tags
github.com·20h·
Discuss: r/LocalLLaMA
Flag this post

Environment

  • Model: kimi-k2-thinking

Description

When using the kimi-k2-thinking model with streaming enabled (stream=True), I’ve observed that special tool-calling tokens such as <|tool_calls_section_begin|> appear within the reasoning_delta stream. This causes parsing failures in standard agent frameworks that expect reasoning_content to contain only natural language reasoning text.

Expected Behavior

According to the official documentation:

  • reasoning_content should contain the model’s thinking/reasoning process
  • Tool calls should be properly structured in the tool_calls field
  • Special tokens like <|tool_calls_section_begin|> should be part of the internal token structure, …

Similar Posts

Loading similar posts...