Update litellm/proxy/common_utils/reset_budget_job.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Shivam Rawat 2026-02-14 19:09:26 -08:00 • committed by GitHub
parent ea87dd2162
commit 2d9508ec96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,13 +76,14 @@ class ResetBudgetJob:
Resets the spend for keys linked to budget tiers that are being reset.
This handles keys that have budget_id but no budget_duration set on the key
itself (e.g. keys created before the fix to inherit budget_duration from
the linked budget tier).
itself. Keys with budget_id rely on their linked budget tier's reset schedule
rather than having their own budget_duration.
Keys that have their own budget_duration are already handled by
reset_budget_for_litellm_keys() and are excluded here to avoid
double-resetting.
"""
"""
budget_ids = [
budget.budget_id
for budget in budgets_to_reset