From a652d351274bfa8a7ebde9f35fe89731e4df9008 Mon Sep 17 00:00:00 2001 From: Praising Harris Ratnam Date: Mon, 19 Oct 2026 01:49:15 +0530 Subject: [PATCH] fix(model_access_group): satisfy LIT type discipline rules for updated_dict and updated_pairs --- .../model_access_group_management_endpoints.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py b/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py index d0398cbb032..d16368f8230 100644 --- a/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py +++ b/litellm/proxy/management_endpoints/model_access_group_management_endpoints.py @@ -661,7 +661,7 @@ async def create_model_group( ) # Update deployments using provided model_ids and/or model_names - updated_dict: dict[str, str] = {} + updated_dict: Final[dict[str, str]] = {} # mutable-ok: accumulator for unique deployment updates if has_model_ids: assert data.model_ids is not None for pair in await update_specific_deployments_with_access_group( @@ -680,7 +680,7 @@ async def create_model_group( ): updated_dict[pair[0]] = pair[1] - updated_pairs = list(updated_dict.items()) + updated_pairs: Final = list(updated_dict.items()) models_updated: Final = len(updated_pairs) live_before_reload: Final = live_model_ids_snapshot() @@ -928,7 +928,7 @@ async def update_access_group( stripped_pairs: Final = tuple(pair for pair in stripped if pair is not None) # Step 2: Add access group using provided model_ids and/or model_names - updated_dict: dict[str, str] = {} + updated_dict: Final[dict[str, str]] = {} # mutable-ok: accumulator for unique deployment updates if has_model_ids: assert data.model_ids is not None for pair in await update_specific_deployments_with_access_group( @@ -947,7 +947,7 @@ async def update_access_group( ): updated_dict[pair[0]] = pair[1] - updated_pairs = list(updated_dict.items()) + updated_pairs: Final = list(updated_dict.items()) models_updated: Final = len(updated_pairs) # Clear cache and reload models to pick up the access group changes