From 90d61432cf50a820abef0c5152191c413cc42da7 Mon Sep 17 00:00:00 2001 From: Julio Quinteros Pro Date: Sat, 14 Feb 2026 15:44:02 -0300 Subject: [PATCH] Fix LiteLLM_JWTAuth annotations access bug The __init__ method was trying to access self.__annotations__ before super().__init__() was called, resulting in an empty annotations dict. Changed to use the class annotations directly: LiteLLM_JWTAuth.__annotations__ instead of self.__annotations__. This fixes the ValueError: "Invalid arguments provided: user_email_jwt_field, user_id_upsert, user_allowed_email_domain. Allowed arguments are: ." Co-Authored-By: Claude Sonnet 4.5 --- litellm/proxy/_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index 45476900a26..68d0ed2bb7a 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -3776,7 +3776,7 @@ class LiteLLM_JWTAuth(LiteLLMPydanticObjectBase): def __init__(self, **kwargs: Any) -> None: # get the attribute names for this Pydantic model - allowed_keys = self.__annotations__.keys() + allowed_keys = LiteLLM_JWTAuth.__annotations__.keys() invalid_keys = set(kwargs.keys()) - allowed_keys user_roles_jwt_field = kwargs.get("user_roles_jwt_field")