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

#28778 [Bug]: When an agent with tools turns on either redis-semanticor qdrant-semantic cache mode and carries tool return JSON requests to the gateway, the tool return content will be lost.

  • State: open
  • Author: @WHUhuangke
  • 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?

Observed Behavior​ After tool invocation, the agent began repeating requests. Logs confirmed that tool responses were correctly returned, so the issue was not an infinite loop. Root Cause Analysis​ The most probable cause is improper injection of tool results into the model context: the results lacked the required role=tooland corresponding tool_call_id. Langfuse Tracing​ Multiple ToolNodes were observed, each showing normal tool input and output. However, once execution returned to the parent Chat Model node, the tool outputs disappeared. Only the tool request and assistant tool_call_idremained. Hypothesis​ When tool invocation is combined with semantic similarity caching, tool response payloads are lost. The agent, seeing only the tool request, assumes the tool has not been executed and repeatedly issues new calls, resulting in persistent errors.

### Steps to Reproduce

1. create a simple agent with a tool 2. set up litellm on your machine with the following config: model_list: - model_name: tokenhub-deepseek-v4-pro litellm_params: …

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h44m35s ago — entered · #import:https:::github.com:berriai:litellm post #2222
Issue #28778 is harder because it requires tracing and correcting state preservation across agent tool-call handling, message translation, and multiple semantic-cache backends, with regression risk in conversational workflows. Issue #34648 is primarily a scoped provider integration involving API mapping, validation, and proxy support.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search