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: