From 9a5987b055cf1c69ff02a436c1daf663b96d39ba Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 15 Jul 2026 05:25:54 +0000 Subject: [PATCH] style(anthropic-adapter): drop added comments per repo convention Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com> --- .../experimental_pass_through/adapters/streaming_iterator.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/litellm/llms/anthropic/experimental_pass_through/adapters/streaming_iterator.py b/litellm/llms/anthropic/experimental_pass_through/adapters/streaming_iterator.py index 6eb9ebfd702..2eaa19c0f0c 100644 --- a/litellm/llms/anthropic/experimental_pass_through/adapters/streaming_iterator.py +++ b/litellm/llms/anthropic/experimental_pass_through/adapters/streaming_iterator.py @@ -844,10 +844,6 @@ class AnthropicStreamWrapper(AdapterCompletionStreamWrapper): """ Async version of anthropic_sse_wrapper. Convert AnthropicStreamWrapper dict chunks to Server-Sent Events format. - - A failure raised while iterating the upstream stream is surfaced as an - Anthropic ``error`` event so the SSE stream stays well-formed instead of - the connection being torn down. """ try: async for chunk in self: @@ -856,7 +852,6 @@ class AnthropicStreamWrapper(AdapterCompletionStreamWrapper): payload = f"event: {event_type}\ndata: {json.dumps(chunk)}\n\n" yield payload.encode() else: - # For non-dict chunks, forward the original value unchanged yield chunk except Exception as e: # noqa: BLE001 # boundary before the socket: any upstream failure becomes an Anthropic error event verbose_logger.exception("Anthropic Adapter - mid-stream error, emitting Anthropic error event: %s", e)