Files
MoFin/venv/lib/python3.12/site-packages/litellm/anthropic_interface/exceptions/exceptions.py
T
知微 fa45d8aa5f fix: 小果地址统一node122(兼容LAN+EasyTier)
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
  Privoxy对node122:18003返回500,直连正常
2026-06-30 02:56:35 +08:00

41 lines
911 B
Python

"""Anthropic error format type definitions."""
from typing_extensions import Literal, Required, TypedDict
# Known Anthropic error types
# Source: https://docs.anthropic.com/en/api/errors
AnthropicErrorType = Literal[
"invalid_request_error",
"authentication_error",
"permission_error",
"not_found_error",
"request_too_large",
"rate_limit_error",
"api_error",
"overloaded_error",
]
class AnthropicErrorDetail(TypedDict):
"""Inner error detail in Anthropic format."""
type: AnthropicErrorType
message: str
class AnthropicErrorResponse(TypedDict, total=False):
"""
Anthropic-formatted error response.
Format:
{
"type": "error",
"error": {"type": "...", "message": "..."},
"request_id": "req_..." # optional
}
"""
type: Required[Literal["error"]]
error: Required[AnthropicErrorDetail]
request_id: str