From cffc92bebeb50d1bd731a39621e4edc91435d1f0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 18 Mar 2026 01:44:52 +0000 Subject: [PATCH] fix(mypy): annotate jwt_claims as Optional[dict] to fix type incompatibility Co-authored-by: Ishaan Jaff --- litellm/proxy/auth/user_api_key_auth.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/proxy/auth/user_api_key_auth.py b/litellm/proxy/auth/user_api_key_auth.py index 6443f638ab9..044333ac134 100644 --- a/litellm/proxy/auth/user_api_key_auth.py +++ b/litellm/proxy/auth/user_api_key_auth.py @@ -685,6 +685,7 @@ async def _user_api_key_auth_builder( # noqa: PLR0915 do_standard_jwt_auth = True if jwt_handler.litellm_jwtauth.virtual_key_claim_field is not None: # Decode JWT to get claims without running full auth_builder + jwt_claims: Optional[dict] if jwt_handler.litellm_jwtauth.oidc_userinfo_enabled: jwt_claims = await jwt_handler.get_oidc_userinfo(token=api_key) else: