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

#27492 use_chat_completions_api: true drops content when provider returns reasoning_content

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

## Bug Description

When `use_chat_completions_api: true` is configured on a model with `model: openai/...`, the proxy correctly calls the upstream OpenAI API's `/v1/chat/completions` endpoint. However, when converting the response back to Anthropic Messages API format, the `content` field is dropped when the upstream also returns `reasoning_content` (a non-standard field used by DeepSeek, Kimi, etc. for chain-of-thought).

## Expected

The Anthropic-format response should include the model text content: ``` {"type":"message","content":[{"type":"text","text":"hello"}],"stop_reason":"end_turn"} ```

## Actual

Response has empty content when upstream includes reasoning: ``` {"type":"message","content":[],"stop_reason":"end_turn"} ```

## Steps

1. Config: ```yaml model_list: - model_name: deepseek-v4-flash litellm_params: model: openai/deepseek-v4-flash api_base: https://opencode.ai/zen/go/v1 api_key: os.environ/OPENCODE_GO_API_KEY use_chat_completions_api: true ```

2. Start proxy: `litellm --config config.yaml --port 4000`

3. Send request via `/v1/messages` (Anthropic): `curl http://localhost:4000/v1/messages -H "Authorization: Bearer sk-test" -H "an…

GitHub resolver

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

Refresh page
vote history (3 events)
#0 of 0 · 31d18h37m52s ago — entered · #import:https:::github.com:berriai:litellm post #2425
The right issue is harder because it touches cross-cutting SSO authorization, user-account classification, licensing limits, and dashboard/API behavior, requiring clarification of policy and regression coverage. The left issue is a narrowly scoped response-conversion defect with a localized fix and targeted tests.
27094 is harder because it spans provider metadata updates plus investigation of a potentially stateful Admin UI credential-binding defect, requiring broader cross-layer validation. 27492 is comparatively localized to response translation logic with focused regression coverage.
#0 of 0 · 31d18h3m37s ago — current · #import:https:::github.com:berriai:litellm post #3012
The left issue is harder because it lacks a reliable reproduction and may require tracing cross-provider request translation, tool-call normalization, and model-specific validation. The right issue has a deterministic response-conversion path and a narrower fix with straightforward regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search