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

#34099 [Bug]: internal_user role never receives messages/response from /spend/logs/ui, even for own requests, despite store_prompts_in_spend_logs=true

  • State: open
  • Author: @krth1k
  • Labels: ui-dashboard

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

When `store_prompts_in_spend_logs: true` is enabled, the `/spend/logs/ui` endpoint returns full `messages`/`response` content to callers with the `proxy_admin` role, but **omits the `messages` and `response` fields entirely** from the JSON payload when the same exact log row (same `request_id`) is requested by a caller with the `internal_user` role — even when that `internal_user` is the owner of the request.

This makes the Admin UI's Request Logs page show "Request/Response Data Not Available" for `internal_user` accounts on requests that do have stored prompt/response data. The banner's suggested fix ("enable prompt storage") is misleading in this case, since storage is already enabled and working (proven by the `proxy_admin` view of the identical row).

I expected an `internal_user` to be able to view the full request/response content of their **own** requests when `store_prompts_in_spend_logs` is enabled, consistent with the fact that they can already see every other field for that same row (tokens, cost, duration, tags, model, team, etc.)…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h9m2s ago — entered · #import:https:::github.com:berriai:litellm post #2917
The left issue is harder because it involves authorization semantics, conditional response shaping, persisted-data access, and UI behavior across multiple layers, with security-sensitive regression testing. The right issue is comparatively localized to provider model metadata, with a narrower investigation for credential reuse.
#0 of 0 · 31d18h4m12s ago — current · #import:https:::github.com:berriai:litellm post #3003
#35097 requires coordinated changes across tag-expression parsing, per-request routing behavior, fallback semantics, backward compatibility, and broad router test coverage; #34099 is comparatively localized to spend-log authorization/data shaping and UI verification.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search