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]