mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix ProxyErrorTypes
This commit is contained in:
parent
4c87084ff7
commit
59040167ac
1 changed files with 49 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue