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: empty stdout/stderr produces str(content) instead of empty logs
Andrzej Pomirski4be1d76fd7da
diff --git a/litellm/llms/anthropic/chat/handler.py b/litellm/llms/anthropic/chat/handler.pyindex 7d5fa2a5591..88d9ee65969 100644--- a/litellm/llms/anthropic/chat/handler.py+++ b/litellm/llms/anthropic/chat/handler.py@@ -711,7 +711,7 @@ class ModelResponseIterator:parts.append(content["stdout"])if content.get("stderr"):parts.append(f"STDERR: {content['stderr']}")- logs = "".join(parts) if parts else str(content)+ logs = "".join(parts)else:logs = str(content)tool_input = self._server_tool_inputs.get(call_id, {})diff --git a/litellm/llms/anthropic/chat/transformation.py b/litellm/llms/anthropic/chat/transformation.pyindex 033afea2ffa..21ca8db825c 100644--- a/litellm/llms/anthropic/chat/transformation.py+++ b/litellm/llms/anthropic/chat/transformation.py@@ -1775,7 +1775,7 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):parts.append(content["stdout"])if content.get("stderr"):parts.append(f"STDERR: {content['stderr']}")- logs = "".join(parts) if parts else str(content)+ logs = "".join(parts)else:logs = str(content)code_interpreter_results.append(