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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help