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

#28979 [Bug]: /tag/daily/activity returns temporarily inflated spend causing false budget-exceeded detection

  • State: open
  • Author: @moriokaj
  • Labels: llm translation

## Description

`/tag/daily/activity` endpoint occasionally returns spend values that are ~$25–$65 higher than the actual value for a few minutes, then returns to the correct value.

This causes budget management scripts (like ours) to incorrectly detect budget-exceeded and trigger provider failover logic unnecessarily.

## Behavior

- Spend for an active tag spikes temporarily by a fixed amount ($25–$65) - Returns to correct value 5–15 minutes later - Only the **currently-routed (active) provider tag** is affected — inactive tags remain stable - The spike amount correlates with the top 1-2 API keys' spend for the current day

## Environment

- LiteLLM Proxy: self-hosted - Backend: AWS Bedrock (via tag-based routing) - Script polling interval: 5 minutes via `/tag/daily/activity?page_size=100`

## Steps to Reproduce

1. Route traffic through a provider tag actively accumulating daily spend near its budget limit 2. Poll `/tag/daily/activity` every 5 minutes summing `metadata.total_spend` across pages 3. Observe: spend value spikes temporarily above the correct value, then normalizes

## Observed Values (example)

| Time | Reported spend | Expected spend | Spike | |-------|----------…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d19h48s ago — entered · #import:https:::github.com:berriai:litellm post #1860
Issue 28979 has greater engineering risk because it requires tracing distributed spend aggregation, timing, caching, and provider/tag-specific accounting to isolate an intermittent consistency defect. Issue 31095 is comparatively contained in the frontend authentication/error-handling layer, with a clearer global interception and navigation fix.
#0 of 0 · 31d18h48m59s ago — current · #import:https:::github.com:berriai:litellm post #2065
The left issue is harder because it requires coordinated routing behavior, backend health evaluation, failure handling, ordering, and integration across multiple provider paths. The right issue is a narrower accounting/debugging fix, though it may still require tracing aggregation and timing behavior.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search