fix: show budget reset date in BudgetExceededError message

This commit is contained in:
Patrick Decat 2025-04-15 16:57:31 +02:00
parent aff0d1a18c
commit 731263b32e
No known key found for this signature in database
GPG key ID: FD55B9BD5687D8FF
10 changed files with 33 additions and 8 deletions

View file

@ -1035,6 +1035,7 @@ def client(original_function): # noqa: PLR0915
raise BudgetExceededError(
current_cost=litellm._current_cost,
max_budget=litellm.max_budget,
budget_reset_at=litellm.budget_reset_at,
)
# [OPTIONAL] CHECK MAX RETRIES / REQUEST
@ -1283,6 +1284,7 @@ def client(original_function): # noqa: PLR0915
raise BudgetExceededError(
current_cost=litellm._current_cost,
max_budget=litellm.max_budget,
budget_reset_at=litellm.budget_reset_at,
)
# [OPTIONAL] CHECK CACHE