8 views
-/https://github.com/berriai/litellm/issues/31553
GitHub · issue

#31553 [Bug]: unexpected blank assistant message after an assistant message with "tool calls"

  • State: open
  • Author: @BioticR
  • Labels: bug, proxy, llm translation

### Check for existing issues

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

### What happened?

An unexpected blank assistant message emerged in the Litellm AI Gateway's connection with Deepseek's server's chat completion API while I was using codex, which used the `/responses` endpoint of the Litellm AI Gateway and the model `deepseek v4 flash`. This raised an `HTTP 400` error from Deepseek's server: `{"error":{"message":"An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. (insufficient tool messages following tool_calls message)","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}. Received Model Group=deepseek-v4-flash Available Model Group Fallbacks=None` Involved messages were: `[{"tool_calls": [{"id": "call_00_spr6ZlhqFv74vJEmiDbJ8400","type": "function","function": {"name": "shell_command","arguments": "{\"command\": \"Get-ChildItem -Path \\\"D:\\\\626工程\\\" -Depth 0\", \"timeout_ms\":5000}"},"index": 0}],"role": "assistant"},{"role": "assistant","content": [{"type": "text","text": ""}]}]`

### Steps to Reproduce

1. Configure the Litellm AI Gateway …

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h53m12s ago — entered · #import:https:::github.com:berriai:litellm post #2078
Cross-provider protocol translation requires tracing message normalization across endpoints and model adapters, with careful preservation of tool-call ordering and broad regression coverage. The other issue is comparatively localized to database schema migration and version compatibility.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search