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
style: black format anthropic_messages transformation.py
Ishaan Jaffere5adafc7689f
diff --git a/litellm/llms/base_llm/anthropic_messages/transformation.py b/litellm/llms/base_llm/anthropic_messages/transformation.pyindex 733faca8532..49aa563781f 100644--- a/litellm/llms/base_llm/anthropic_messages/transformation.py+++ b/litellm/llms/base_llm/anthropic_messages/transformation.py@@ -141,8 +141,9 @@ class BaseAnthropicMessagesConfig(ABC):is_anthropic_invalid_thinking_signature_error,)- return e.response.status_code == 400 and is_anthropic_invalid_thinking_signature_error(- e.response.text+ return (+ e.response.status_code == 400+ and is_anthropic_invalid_thinking_signature_error(e.response.text))def transform_anthropic_messages_request_on_http_error(@@ -156,8 +157,9 @@ class BaseAnthropicMessagesConfig(ABC):strip_thinking_blocks_from_anthropic_messages_request_dict,)- if e.response.status_code == 400 and is_anthropic_invalid_thinking_signature_error(- e.response.text+ if (+ e.response.status_code == 400+ and is_anthropic_invalid_thinking_signature_error(e.response.text)):strip_thinking_blocks_from_anthropic_messages_request_dict(request_data)return request_data