diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py index 131a6caab07..b606af4c30f 100644 --- a/litellm/proxy/_types.py +++ b/litellm/proxy/_types.py @@ -3000,6 +3000,12 @@ class ProxyException(Exception): error_dict["provider_specific_fields"] = self.provider_specific_fields return error_dict +class ProxyAuthenticationException(ProxyException): + """ + Expected auth error (401) for invalid or missing proxy token. + Logged as unauthenticated, not as an internal crash. + """ + pass class CommonProxyErrors(str, enum.Enum): db_not_connected_error = ( diff --git a/litellm/proxy/auth/auth_checks.py b/litellm/proxy/auth/auth_checks.py index 359bb944546..1638f93e75d 100644 --- a/litellm/proxy/auth/auth_checks.py +++ b/litellm/proxy/auth/auth_checks.py @@ -48,6 +48,7 @@ from litellm.proxy._types import ( LitellmUserRoles, NewTeamRequest, ProxyErrorTypes, + ProxyAuthenticationException, ProxyException, RoleBasedPermissions, SpecialModelNames,