From a4eebf436b29751b6cf84d134389e766120facf2 Mon Sep 17 00:00:00 2001 From: jesus Date: Tue, 3 Nov 2026 18:14:36 +0000 Subject: [PATCH] fix(types): keep default access_group_ids as Sequence for the type discipline gate --- litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py | 2 +- litellm/types/proxy/management_endpoints/ui_sso.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py index 6b56c513c5f..cea6bdfa161 100644 --- a/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py +++ b/litellm/proxy/ui_crud_endpoints/proxy_setting_endpoints.py @@ -1170,7 +1170,7 @@ async def update_internal_user_settings( ) -async def _validate_default_access_groups_exist(access_group_ids: list[str]) -> None: +async def _validate_default_access_groups_exist(access_group_ids: Sequence[str]) -> None: """Reject default access groups that cannot be attached. Teams are created from these settings long after they are saved, and /team/new does diff --git a/litellm/types/proxy/management_endpoints/ui_sso.py b/litellm/types/proxy/management_endpoints/ui_sso.py index e7ccb2d4aad..4d94474e2bd 100644 --- a/litellm/types/proxy/management_endpoints/ui_sso.py +++ b/litellm/types/proxy/management_endpoints/ui_sso.py @@ -1,3 +1,4 @@ +from collections.abc import Sequence from typing import Literal from pydantic import Field @@ -234,7 +235,7 @@ class DefaultTeamSSOParams(LiteLLMPydanticObjectBase): default=None, description="Default organization for new teams created without an explicit organization", ) - access_group_ids: list[str] | None = Field( + access_group_ids: Sequence[str] | None = Field( default=None, description="Default access groups attached to new teams created without explicit access_group_ids", )