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: address review feedback — remove redundant guard, preserve summary in translate_anthropic_to_openai
Chesarsba5d32b6b81c
diff --git a/litellm/llms/anthropic/experimental_pass_through/adapters/handler.py b/litellm/llms/anthropic/experimental_pass_through/adapters/handler.pyindex 01c8f39ee80..4935c65f407 100644--- a/litellm/llms/anthropic/experimental_pass_through/adapters/handler.py+++ b/litellm/llms/anthropic/experimental_pass_through/adapters/handler.py@@ -78,7 +78,7 @@ class LiteLLMMessagesToCompletionTransformationHandler:completion_kwargs["model"] = f"responses/{model}"reasoning_effort = completion_kwargs.get("reasoning_effort")- summary = thinking.get("summary") if isinstance(thinking, dict) else None+ summary = thinking.get("summary")if isinstance(reasoning_effort, str) and reasoning_effort:reasoning_dict: Dict[str, Any] = {"effort": reasoning_effort}if summary:diff --git a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.pyindex 2af5e35112c..ca1a94237a6 100644--- a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py+++ b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py@@ -892,7 +892,11 @@ class LiteLLMAnthropicMessagesAdapter:cast(Dict[str, Any], thinking))if reasoning_effort:- new_kwargs["reasoning_effort"] = reasoning_effort+ summary = thinking.get("summary") if isinstance(thinking, dict) else None+ if summary:+ new_kwargs["reasoning_effort"] = {"effort": reasoning_effort, "summary": summary}+ else:+ new_kwargs["reasoning_effort"] = reasoning_effort## CONVERT OUTPUT_FORMAT to RESPONSE_FORMATif "output_format" in anthropic_message_request: