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

#34612 [Bug]: LiteLLM SAP provider fails to parse `gemini-3.5-flash` responses due to `reasoning_content` type mismatch

  • State: open
  • Author: @W6WM9M
  • Labels: bug, 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?

## Summary

When calling `sap/gemini-3.5-flash` through LiteLLM, the request appears to complete successfully, but LiteLLM fails while transforming the SAP response into a `ModelResponse`.

The SAP response contains `reasoning_content` as a list of structured reasoning blocks, while LiteLLM's `ModelResponse.reasoning_content` field expects a string.

This results in a Pydantic validation error before the completion response is returned to the caller.

## Environment

* LiteLLM version: `1.92.0` * Python version: `3.12` * Provider: SAP AI Core / SAP Generative AI Hub * Model: `sap/gemini-3.5-flash` * Pydantic version: `2.13.x`

## Minimal reproduction

```python from litellm import completion

response = completion( model="sap/gemini-3.5-flash", messages=[ { "role": "user", "content": "Hi!" } ] )

print(response) ```

## Expected behavior

LiteLLM should return a valid `ModelResponse`, for example:

```python response.choices[0].message.content ```

If SAP returns structured reasoning blocks, L…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 Ā· 31d18h5m9s ago — entered Ā· #import:https:::github.com:berriai:litellm post #2766
The right issue is harder due to distributed-state consistency, persistence coordination, race conditions, security implications, and broader regression-testing requirements. The left issue is comparatively localized to response normalization and type validation within one provider integration.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search