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(anthropic_adapter.py): fix sync streaming
Krrish Dholakiaf5b93fa80d6d
diff --git a/litellm/adapters/anthropic_adapter.py b/litellm/adapters/anthropic_adapter.pyindex dead0642db5..1bff003be31 100644--- a/litellm/adapters/anthropic_adapter.py+++ b/litellm/adapters/anthropic_adapter.py@@ -118,7 +118,10 @@ class AnthropicStreamWrapper(AdapterCompletionStreamWrapper):return return_chunkelse:return processed_chunk-+ if self.holding_chunk is not None:+ return_chunk = self.holding_chunk+ self.holding_chunk = None+ return return_chunkif self.sent_last_message is False:self.sent_last_message = Truereturn {"type": "message_stop"}