From 1c30d2745feca81082f15534e54ebbd417dd63cf Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 21 Jun 2025 14:28:05 -0700 Subject: [PATCH] fix is_team_count_over_limit --- litellm/proxy/_types.py | 1 + litellm/proxy/auth/litellm_license.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index 6592efca0b1..e30fc775057 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -3114,3 +3114,4 @@ class EnterpriseLicenseData(TypedDict, total=False): user_id: str allowed_features: List[str] max_users: int + max_teams: Optional[int] diff --git a/litellm/proxy/auth/litellm_license.py b/litellm/proxy/auth/litellm_license.py index 0a67105ef59..80e08bde52c 100644 --- a/litellm/proxy/auth/litellm_license.py +++ b/litellm/proxy/auth/litellm_license.py @@ -147,11 +147,13 @@ class LicenseCheck: """ if self.airgapped_license_data is None: return False + + _max_teams_in_license: Optional[int] = self.airgapped_license_data.get("max_teams") if "max_teams" not in self.airgapped_license_data or not isinstance( - self.airgapped_license_data["max_teams"], int + _max_teams_in_license, int ): return False - return team_count > self.airgapped_license_data["max_teams"] + return team_count > _max_teams_in_license def verify_license_without_api_request(self, public_key, license_key): try: