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

#31839 [Bug]: Redis counter spend:end_user:{id} not deleted on /customer/delete

  • State: open
  • Author: @impr3ssi0n
  • Labels: bug, proxy

### Check for existing issues

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

### What happened?

When deleting a customer via `/customer/delete`, the Redis counter `spend:end_user:{id}` is not deleted or reset. When re-creating a customer with the same `user_id`, the new customer starts with the old spend value from Redis.

**Example:** 1. Create customer, make request -> `spend` becomes 0.000128 2. `/customer/delete` 3. `/customer/new` (same user_id, new budget) 4. `/customer/info` shows `spend: 0.0` (DB query, correct) 5. Budget check fails: "ExceededBudget: Spend=0.000128, Budget=0.00001" (Redis counter, wrong!)

Expected: `/customer/delete` should remove `spend:end_user:{id}` from Redis.

### Steps to Reproduce

When deleting a customer via `/customer/delete`, the Redis counter `spend:end_user:{id}` is not deleted or reset. When re-creating a customer with the same `user_id`, the new customer starts with the old spend value from Redis.

**Example:** 1. Create customer, make request -> `spend` becomes 0.000128 2. `/customer/delete` 3. `/customer/new` (same user_id, new budget) 4. `/customer/info` shows `spend: 0.0` (DB query, correct) 5…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h34m47s ago — entered · #import:https:::github.com:berriai:litellm post #2276
The right issue is harder because it requires tracing and correcting streaming event generation across the Responses API translation layer, preserving protocol ordering and compatibility across endpoints and providers, with comprehensive stream-level tests. The left issue is comparatively localized to customer deletion lifecycle cleanup and a Redis key operation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search