From aaf0570f225201f82fe7236355aae70c6d59bcf2 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Thu, 26 Feb 2026 21:02:12 -0800 Subject: [PATCH] fix: normalize null to [] for all Optional[List[str]] fields in update_data Extend the null normalization to access_model_names, access_mcp_server_ids, and access_agent_ids in addition to assigned_team_ids and assigned_key_ids. Writing null for non-optional list fields causes ValidationError on read. Co-Authored-By: Claude Sonnet 4.6 --- litellm/proxy/management_endpoints/access_group_endpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/management_endpoints/access_group_endpoints.py b/litellm/proxy/management_endpoints/access_group_endpoints.py index 53dfbcda83..d58dca5aec 100644 --- a/litellm/proxy/management_endpoints/access_group_endpoints.py +++ b/litellm/proxy/management_endpoints/access_group_endpoints.py @@ -392,7 +392,7 @@ async def update_access_group( update_fields = data.model_dump(exclude_unset=True) update_data: dict = {"updated_by": user_api_key_dict.user_id} for field, value in update_fields.items(): - if field in ("assigned_team_ids", "assigned_key_ids") and value is None: + if field in ("assigned_team_ids", "assigned_key_ids", "access_model_names", "access_mcp_server_ids", "access_agent_ids") and value is None: value = [] update_data[field] = value