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

#28562 [Bug]: Bug Report: Anthropic passthrough response `id` (`msg_...`) mismatches spend log `request_id`

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

### Describe the bug

When calling the Anthropic passthrough endpoint (`/anthropic/v1/messages`), the response body contains Anthropic's native `msg_...` ID in the `id` field. However, the `request_id` stored in the LiteLLM spend logs is a UUID (`litellm_call_id`). This makes it impossible for clients to correlate a response with its spend log entry using the response body alone.

### Steps to Reproduce

### To Reproduce

1. Send a request to the Anthropic passthrough endpoint:

```bash curl -X POST "http://localhost:4000/anthropic/v1/messages" \ -H "Authorization: Bearer sk-1234" \ -H "Content-Type: application/json" \ -H "Anthropic-Version: 2023-06-01" \ -d '{ "model": "claude-sonnet-4-5-20250929", "max_tokens": 10, "messages": [{"role": "user", "content": "Hello"}] }'

2. Observe the response body contains "id": "msg_01AbCdEfGhIjKlMnOpQrStUv" (Anthropic's original ID). 3. The response header contains x-litellm-call-id: ffcb49e7-bd6e-4e56-9c08-a7243802b26a (LiteLLM-generated UUID). 4. Q…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h15m43s ago — entered · #import:https:::github.com:berriai:litellm post #2594
The right issue is substantially harder: it requires an optional, reliable scheduling subsystem spanning queue persistence, worker coordination, priority semantics, retries, observability, and proxy compatibility. The left issue is a narrowly scoped identifier-mapping and logging consistency fix.
#0 of 0 · 31d17h47m5s ago — current · #import:https:::github.com:berriai:litellm post #3096
The left issue requires designing reusable batching, size-limit handling, configuration, retries, and integration across embedding and MCP execution paths, with concurrency and regression risks. The right issue is primarily a localized identifier-mapping and persistence correction with narrower compatibility concerns.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search