From 674b95e12164f84043528fbd169a798769c20e9b Mon Sep 17 00:00:00 2001 From: Ankit Jha Date: Wed, 16 Sep 2026 15:15:24 +0530 Subject: [PATCH] fix: satisfy the LIT002 type-discipline gate for vertex_location_params Each ternary branch now wraps its own dict literal in MappingProxyType, so both count as an argument passed directly to a freezing wrapper instead of a bare mutable-collection construction. Confirmed against the actual checker: litellm/ scores identically to the merge base with this change applied (26719 either way). Signed-off-by: Ankit Jha --- litellm/google_genai/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/google_genai/main.py b/litellm/google_genai/main.py index 627c2919fd4..3daf43c729e 100644 --- a/litellm/google_genai/main.py +++ b/litellm/google_genai/main.py @@ -203,7 +203,9 @@ class GenerateContentHelper: MappingProxyType(litellm_params.model_dump(exclude_none=True)) ) vertex_location_params: Final = ( - {"vertex_location": explicit_vertex_location} if explicit_vertex_location else {} + MappingProxyType({"vertex_location": explicit_vertex_location}) + if explicit_vertex_location + else MappingProxyType({}) ) litellm_logging_obj.update_from_kwargs(