diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.py index 36c284ae3e2..8eab08c7025 100644 --- a/litellm/proxy/auth/auth_checks.py +++ b/litellm/proxy/auth/auth_checks.py @@ -5540,7 +5540,7 @@ async def _user_multi_budget_check( """ if valid_token is None or not valid_token.user_budget_limits or valid_token.user_id is None: return - is_team_key: Final = team_object is not None and team_object.team_id is not None + is_team_key: Final = team_object is not None and bool(team_object.team_id) if is_team_key and general_settings.get("apply_user_budget_to_team_keys") is not True: return diff --git a/litellm/proxy/management_endpoints/common_utils.py b/litellm/proxy/management_endpoints/common_utils.py index 36f7464c8bb..541ee2f17fb 100644 --- a/litellm/proxy/management_endpoints/common_utils.py +++ b/litellm/proxy/management_endpoints/common_utils.py @@ -57,7 +57,7 @@ def validate_budget_limits(budget_limits: Sequence[object] | None, status_code: for entry in budget_limits ) for window in windows: - error: Final = budget_duration_error(window.budget_duration) + error = budget_duration_error(window.budget_duration) if error is not None: raise HTTPException( status_code=status_code,