-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Labels
Milestone
Description
Problem
When using tool-calling agents with Moonshot AI Kimi models, multi-turn conversations fail with a 400 error on the second turn.
These models include a reasoning_content field in their responses. When tool calls are also present, the reasoning_content must be included in the assistant message sent back to the API on the next turn — otherwise the API rejects the request.
Currently this behaviour is only implemented for DeepSeek models.
Affected models:
- Moonshot AI:
kimi-k2,kimi-k2.5, and other Kimi reasoning variants —reasoning_contentis required for multi-turn tool-calling; omitting it causes a400error. - Zhipu AI:
GLM-5, etc. —reasoning_contentis not strictly required (no error without it), but including it is beneficial for model performance.
Question
Is there a recommended way to support reasoning_content for these additional providers?
Reactions are currently unavailable