9 views
-/https://github.com/berriai/litellm/issues/29216
GitHub · issue

#29216 [Bug]: Proxy drops message.reasoning_content for Mistral reasoning models (SDK returns it)

  • State: open
  • Author: @capitanroy
  • Labels: llm translation

## What happened?

Calling a Mistral reasoning model (`mistral-medium-3-5` with `reasoning_effort="high"`) through the **litellm proxy** (`POST /v1/chat/completions`) returns a response whose `message` has **no `reasoning_content`** — the thinking trace is dropped. The identical call via the **`litellm.completion()` SDK** (in-process) returns `reasoning_content` correctly.

Mistral returns reasoning as a typed block inside `content` (`[{"type":"thinking",...},{"type":"text",...}]`). The SDK's Mistral transformer maps the thinking block to `message.reasoning_content`; the proxy's HTTP serialization does not include it. This breaks parity with how the proxy exposes reasoning for Anthropic thinking / DeepSeek / Magistral.

## How to reproduce

**(A) SDK, in-process — `reasoning_content` IS present:** ```python import litellm r = litellm.completion( model="mistral/mistral-medium-3-5", messages=[{"role": "user", "content": "If a train travels 60 km in 45 minutes, what is its speed in km/h?"}], reasoning_effort="high", allowed_openai_params=["reasoning_effort"], max_tokens=2000, ) m = r.choices[0].message print(len(m.reasoning_content or "")) # -> 1046 print(len(m.co…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d19h12m29s ago — entered · #import:https:::github.com:berriai:litellm post #1672
Issue #31343 is harder because it involves cross-provider fallback behavior, tool-schema normalization, and compatibility with the Agents SDK across multiple execution paths. Issue #29216 is comparatively localized to preserving an already-produced reasoning field during proxy response serialization.
#0 of 0 · 31d19h4m18s ago — current · #import:https:::github.com:berriai:litellm post #1797
The left task spans managed-file routing, Bedrock-specific storage metadata, enterprise hooks, persistence, and retrieval behavior across proxy and provider layers. The right task is narrower: align proxy response serialization with an existing SDK transformation, with likely focused coverage for related reasoning formats and streaming paths.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search