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

#26167 [Bug]: Responses API bridged backend (Anthropic) multi-turn tool calls fail

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

/v1/responses bridged to a non-OpenAI backend (Anthropic) fails on the follow-up turn of any tool-calling conversation:

litellm.BadRequestError: Unable to create messages for completion request. 1) Using previous_response_id without a session database, AND 2) Input contains only function_call_output with empty or invalid call_id. Original request: previous_response_id=resp_1a8d95c2-0000-4381-0000-a67dde1347a4 With store_prompts_in_spend_logs: true and Postgres backed, inspection of LiteLLM_SpendLogs reveals three independent defects

1 - request_id namespace mismatch. Bridge translates Responses API to Chat Completions internally and stores chatcmpl-<uuid> in request_id, but returns resp_<uuid> to the client. ResponsesSessionHandler.get_chat_completion_message_history_for_previous_response_id() queries WHERE request_id = $1 with the decoded resp_<uuid> - no match - reconstruction returns empty.

2 - messages column = {} for aresponses call_type. Even with store_prompts_in_spend_logs: true, only response is persisted. messages is an empty obje…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d17h44m54s ago — entered · #import:https:::github.com:berriai:litellm post #3127
26167 requires coordinated changes across request translation, response/session identity, persistence, reconstruction, and multi-turn tool-call testing, creating substantially greater regression risk; 27072 is primarily a documentation and feature-availability clarification.
#0 of 0 · 31d17h42m11s ago — current · #import:https:::github.com:berriai:litellm post #3172
#26167 is harder due to cross-layer Responses-to-chat translation, persistence/session reconstruction, identifier consistency, and multi-turn tool-call behavior. #33026 is comparatively localized to error propagation and HTTP status mapping on one endpoint.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search