mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(proxy_server.py): add back in default team member budget update
This commit is contained in:
parent
e4133f9127
commit
ac83c50137
1 changed files with 13 additions and 1 deletions
|
|
@ -3370,7 +3370,19 @@ class ProxyStartupEvent:
|
|||
@classmethod
|
||||
async def _update_default_team_member_budget(cls):
|
||||
"""Update the default team member budget"""
|
||||
pass
|
||||
if litellm.default_internal_user_params is None:
|
||||
return
|
||||
|
||||
_teams = litellm.default_internal_user_params.get("teams") or []
|
||||
if _teams and all(isinstance(team, dict) for team in _teams):
|
||||
from litellm.proxy.ui_crud_endpoints.proxy_setting_endpoints import (
|
||||
update_default_team_member_budget,
|
||||
)
|
||||
|
||||
teams_pydantic_obj = [NewUserRequestTeam(**team) for team in _teams]
|
||||
await update_default_team_member_budget(
|
||||
teams=teams_pydantic_obj, user_api_key_dict=UserAPIKeyAuth(token=hash_token(master_key)) # type: ignore
|
||||
)
|
||||
|
||||
@classmethod
|
||||
async def initialize_scheduled_background_jobs(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue