
LiteLLM Rewrites Your Tool Call IDs: Debugging Broken Multi-Turn Tool Loops Across Ollama, Gemini and Responses Bridges
Your agent calls a tool through a LiteLLM proxy. Turn one returns a tool call, the tool runs, and turn two comes back with an empty tool result or a 400 from the provider. The model never saw a different question — it saw a conversation whose tool call and tool result no longer share an identifier. That single broken invariant produces a whole family of symptoms that look like model failures, and the code paths responsible sit in the proxy, not in the model. ...