fix ProxyErrorTypes

This commit is contained in:
Ishaan Jaff 2025-03-25 14:40:11 -07:00
parent 4c87084ff7
commit 59040167ac

View file

@ -2067,16 +2067,64 @@ class SpendCalculateRequest(LiteLLMPydanticObjectBase):
class ProxyErrorTypes(str, enum.Enum):
budget_exceeded = "budget_exceeded"
"""
Object was over budget
"""
token_not_found_in_db = "token_not_found_in_db"
"""
Requested token was not found in the database
"""
key_model_access_denied = "key_model_access_denied"
"""
Key does not have access to the model
"""
team_model_access_denied = "team_model_access_denied"
"""
Team does not have access to the model
"""
user_model_access_denied = "user_model_access_denied"
"""
User does not have access to the model
"""
expired_key = "expired_key"
"""
Key has expired
"""
auth_error = "auth_error"
"""
General authentication error
"""
internal_server_error = "internal_server_error"
"""
Internal server error
"""
bad_request_error = "bad_request_error"
"""
Bad request error
"""
not_found_error = "not_found_error"
validation_error = "bad_request_error"
"""
Not found error
"""
validation_error = "validation_error"
"""
Validation error
"""
cache_ping_error = "cache_ping_error"
"""
Cache ping error
"""
@classmethod
def get_model_access_error_type_for_object(
@ -2093,9 +2141,6 @@ class ProxyErrorTypes(str, enum.Enum):
return cls.user_model_access_denied
DB_CONNECTION_ERROR_TYPES = (httpx.ConnectError, httpx.ReadError, httpx.ReadTimeout)
class SSOUserDefinedValues(TypedDict):
models: List[str]
user_id: str