4 views
-/https://github.com/berriai/litellm/issues/32028
GitHub · issue

#32028 [Bug]: Anthropic S3 raw log: s3 file name does not match request_id in rds

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

When the `s3_v2` logging callback writes a request payload to S3, the object key (and the `Content-Disposition` download filename) is derived from the upstream provider's response id rather than the LiteLLM `request_id` that gets stored in the database.

For the native Anthropic Messages path (`call_type == anthropic_messages`, POST `/v1/messages`), the response carries Anthropic's own `msg_...` id. That `msg_...` id ends up in the S3 object name, while the `LiteLLM_SpendLogs.request_id` column for the same request resolves to `litellm_call_id`. The two identifiers diverge, so there is no way to take an S3 object name and look up its corresponding row by `request_id`.

The `msg_...` id is not stored in any dedicated DB column. It only appears inside the `LiteLLM_SpendLogs.response` JSON blob (`response->>'id'`), and only when `store_prompts_in_spend_logs` is enabled. With that setting off, the S3 filename id is unrecoverable from the database entirely.

## Root cause

The S3 object name is built from the standard logging payload id, which is th…

GitHub resolver

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

Refresh page
vote history (3 events)
#0 of 0 · 31d17h56m42s ago — entered · #import:https:::github.com:berriai:litellm post #2919
The left issue is harder because it requires coordinating identifier propagation across request handling, logging, database persistence, and object-storage naming, with compatibility and configuration edge cases. The right issue is comparatively localized input normalization with a smaller regression surface.
The left issue is harder because it involves diagnosing and safely correcting distributed request isolation under concurrency, with substantial security, caching, deployment, and regression risk. The right issue is comparatively scoped to aligning identifiers across logging and persistence paths.
#0 of 0 · 31d17h19m42s ago — current · #import:https:::github.com:berriai:litellm post #3538
Issue #26535 is substantially harder because it spans a multi-provider compatibility matrix, proxy configuration, test infrastructure, CI gating, version resolution, and broad end-to-end validation. Issue #32028 is a more narrowly scoped logging-path bug involving consistent identifier selection for S3 keys and stored request metadata.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search