From bcf2420e6da67ed0c5eabd541b343457c7a968e9 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 18 Dec 2024 15:30:08 -0800 Subject: [PATCH] Replace deprecated Pydantic Config class with model_config BerriAI/litellm#6902 (#6903) (#7300) Co-authored-by: Dan Siwiec --- litellm/proxy/_types.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index 0fa7b7fc036..2c2fee5dbc2 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -1431,6 +1431,8 @@ class UserAPIKeyAuth( user_tpm_limit: Optional[int] = None user_rpm_limit: Optional[int] = None + model_config = ConfigDict(arbitrary_types_allowed=True) + @model_validator(mode="before") @classmethod def check_api_key(cls, values): @@ -1442,9 +1444,6 @@ class UserAPIKeyAuth( values.update({"api_key": hash_token(values.get("api_key"))}) return values - class Config: - arbitrary_types_allowed = True - class UserInfoResponse(LiteLLMPydanticObjectBase): user_id: Optional[str]