6 views
-/https://github.com/berriai/litellm/issues/26156
GitHub · issue

#26156 [Bug]: Moonshot/Kimi K2.6 - reasoning_content is missing in assistant tool call message during multi-turn tool calling

  • State: open
  • Author: @criticic
  • Labels: llm translation, SDK

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

When using LiteLLM with the Moonshot provider (`moonshot/kimi-k2.6`) for multi-turn tool calling, the Moonshot API returns a `400 Bad Request` error because `reasoning_content` is missing from the assistant tool call message in subsequent turns.

This is the same issue as #21672, which was fixed by PR #23580 — but the fix only covers `kimi-k2.5`, `kimi-k2-thinking`, and `kimi-k2-thinking-turbo`. The newly released `kimi-k2.6` model is not included in the `model_prices_and_context_window.json` file, so `supports_reasoning` returns `False` and `fill_reasoning_content()` is never called.

Kimi K2.6 has thinking/reasoning enabled by default. The Moonshot API requires that `reasoning_content` from the assistant response be preserved and sent back in the conversation history during multi-step tool calling. The official API documentation (https://platform.moonshot.ai/docs/api/chat) describes the `thinking` parameter with a `keep` field for K2.6 that controls whether `reasoning_content` from historical turns is preserved:

> Controls whether reasoning_…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d17h49m38s ago — entered · #import:https:::github.com:berriai:litellm post #3060
Adding a new provider requires broader integration across request routing, authentication, model metadata, compatibility handling, and comprehensive tests. The other issue is a narrower correction to existing provider/model reasoning behavior.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search