Skip to content

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]

fix - anthropic messages exception

Ishaan Jaff1fc590c0d12d
diff --git a/litellm/llms/base_llm/anthropic_messages/transformation.py b/litellm/llms/base_llm/anthropic_messages/transformation.py
index 70a29e01005..d0728580076 100644
--- a/litellm/llms/base_llm/anthropic_messages/transformation.py
+++ b/litellm/llms/base_llm/anthropic_messages/transformation.py
@@ -114,6 +114,7 @@ class BaseAnthropicMessagesConfig(ABC):
def get_error_class(
self, error_message: str, status_code: int, headers: Union[dict, httpx.Headers]
) -> "BaseLLMException":
+ from litellm.llms.base_llm.chat.transformation import BaseLLMException
return BaseLLMException(
message=error_message, status_code=status_code, headers=headers
)