The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix type error
Ishaan Jaffbd480bea079e
diff --git a/litellm/proxy/client/exceptions.py b/litellm/proxy/client/exceptions.pyindex ee6c418fbe9..fffd1b78b7e 100644--- a/litellm/proxy/client/exceptions.py+++ b/litellm/proxy/client/exceptions.py@@ -1,10 +1,12 @@+from typing import Union+import requestsclass UnauthorizedError(Exception):"""Exception raised when the API returns a 401 Unauthorized response."""- def __init__(self, orig_exception: requests.exceptions.HTTPError | str):+ def __init__(self, orig_exception: Union[requests.exceptions.HTTPError, str]):self.orig_exception = orig_exceptionsuper().__init__(str(orig_exception))@@ -12,6 +14,6 @@ class UnauthorizedError(Exception):class NotFoundError(Exception):"""Exception raised when the API returns a 404 Not Found response or indicates a resource was not found."""- def __init__(self, orig_exception: requests.exceptions.HTTPError | str):+ def __init__(self, orig_exception: Union[requests.exceptions.HTTPError, str]):self.orig_exception = orig_exceptionsuper().__init__(str(orig_exception))