mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
fix(internal_user_endpoints.py): set budget_reset_at for /user/update
This commit is contained in:
parent
27090c97dd
commit
7c79cc06ac
1 changed files with 7 additions and 0 deletions
|
|
@ -529,6 +529,13 @@ async def user_update(
|
|||
non_default_values["budget_duration"] = (
|
||||
litellm.internal_user_budget_duration
|
||||
)
|
||||
duration_s = _duration_in_seconds(
|
||||
duration=non_default_values["budget_duration"]
|
||||
)
|
||||
user_reset_at = datetime.now(timezone.utc) + timedelta(
|
||||
seconds=duration_s
|
||||
)
|
||||
non_default_values["budget_reset_at"] = user_reset_at
|
||||
|
||||
## ADD USER, IF NEW ##
|
||||
verbose_proxy_logger.debug("/user/update: Received data = %s", data)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue