mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
parent
3f4ba9f03f
commit
90d61432cf
1 changed files with 1 additions and 1 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue