8 views
-/https://github.com/berriai/litellm/issues/33316
GitHub · issue

#33316 [Bug]: Vertex batch cost via passthrough, batch-cost spend log row is never written, and key/team/tags are unattributed

  • State: open
  • Author: @marcus-linktree
  • 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 a Vertex batch is submitted through the proxy, `CheckBatchCost` computes the cost correctly but no batch-cost `SpendLogs` row is ever written. The creating key shows `$0` spend even after the batch completes. When a row is forced to appear, `api_key`, `team_id`, `request_tags` (and the UI-rendered `user_api_key_alias` / `user_api_key_team_alias`) are all blank.

Root cause: at batch-create time the managed object is stored with no request identity. `VertexPassthroughLoggingHandler` builds `UserAPIKeyAuth(api_key="")` and `created_by` ends up `None`. At cost time the poller therefore has blank identity, and `_ProxyDBLogger` drops the spend row entirely rather than writing an unattributed one (the callback logs `user_api_key None, user_id None, team_id None`). So the batch cost is silently dropped, not merely mis-attributed. There is also nowhere to carry `user_api_key` / `request_tags` from create to cost; the managed-object table has a `team_id` column but not those.

Expected: a batch-cost `SpendLogs` row attributed to the creating virtua…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h21m9s ago — entered · #import:https:::github.com:berriai:litellm post #2509
The left issue requires tracing identity across asynchronous batch creation and completion, extending persisted state, preserving attribution through callbacks, handling database/schema compatibility, and adding end-to-end coverage. The right issue is comparatively localized to metadata sanitization in a small number of logging paths with focused security regression tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search