From 4cb42f81b6fd94a25f921d77f691c20d18fc997b Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 2 Aug 2025 10:34:37 -0700 Subject: [PATCH] fix(proxy_setting_endpoints.py): don't block startup if team doesn't exist in default team member budget --- .../proxy_setting_endpoints.py | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py index e4d469ca9aa..8557bd2bafb 100644 --- a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py +++ b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py @@ -257,14 +257,20 @@ async def update_default_team_member_budget( for team in teams: team_id = team.team_id max_budget_in_team = team.max_budget_in_team - await update_team( - data=UpdateTeamRequest( - team_id=team_id, - team_member_budget=max_budget_in_team, - ), - user_api_key_dict=user_api_key_dict, - http_request=Request(scope={"type": "http"}), - ) + try: + await update_team( + data=UpdateTeamRequest( + team_id=team_id, + team_member_budget=max_budget_in_team, + ), + user_api_key_dict=user_api_key_dict, + http_request=Request(scope={"type": "http"}), + ) + except Exception as e: + verbose_proxy_logger.info( + f"Error updating team {team_id} with team member budget {max_budget_in_team} with error: {e}, skipping.." + ) + continue async def _update_litellm_setting(