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

#33871 [Bug]: project spend is never tracked, so project budgets and alerts never enforce

  • State: open
  • Author: @emerzon
  • Labels: proxy

### Check for existing issues

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

### What happened?

Project management exposes `max_budget`, `soft_budget`, and `budget_duration`, and authenticated requests run project hard- and soft-budget checks, but normal request spend is never attributed to the project

The management endpoint explicitly describes `max_budget` as the project's maximum budget in [`/project/new`](https://github.com/BerriAI/litellm/blob/3f9b71c1a45e870d1789ee105bd59b9274bb0d74/enterprise/litellm_enterprise/proxy/management_endpoints/project_endpoints.py#L252-L335). The auth path calls `_project_max_budget_check` and `_project_soft_budget_check` for a key's project in [`_run_project_checks`](https://github.com/BerriAI/litellm/blob/3f9b71c1a45e870d1789ee105bd59b9274bb0d74/litellm/proxy/auth/auth_checks.py#L276-L318), and both checks read `project_object.spend` in the [project budget helpers](https://github.com/BerriAI/litellm/blob/3f9b71c1a45e870d1789ee105bd59b9274bb0d74/litellm/proxy/auth/auth_checks.py#L4056-L4150)

The post-call spend writer has no `project_id` parameter and only schedules user, key, team, organization, tag,…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h27m23s ago — entered · #import:https:::github.com:berriai:litellm post #2407
Project-level accounting requires tracing identifiers through request, callback, persistence, aggregation, and budget-enforcement paths, with regression coverage and consistency concerns. The transport configuration defect is comparatively localized to provider-specific client setup and parameter filtering.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search