From 9c098e8912f2f2b3ab0daebf2a1d2aad313b99b6 Mon Sep 17 00:00:00 2001 From: cthomas Date: Tue, 9 Sep 2025 16:02:27 -0700 Subject: [PATCH] fix: logger error in streaming interface (#2807) --- letta/interfaces/anthropic_streaming_interface.py | 2 +- letta/interfaces/openai_streaming_interface.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/letta/interfaces/anthropic_streaming_interface.py b/letta/interfaces/anthropic_streaming_interface.py index e295fdd7..a25501d6 100644 --- a/letta/interfaces/anthropic_streaming_interface.py +++ b/letta/interfaces/anthropic_streaming_interface.py @@ -226,7 +226,7 @@ class AnthropicStreamingInterface: except Exception as e: import traceback - logger.error("Error processing stream: %s", e, traceback.format_exc()) + logger.error("Error processing stream: %s\n%s", e, traceback.format_exc()) ttft_span.add_event( name="stop_reason", attributes={"stop_reason": StopReasonType.error.value, "error": str(e), "stacktrace": traceback.format_exc()}, diff --git a/letta/interfaces/openai_streaming_interface.py b/letta/interfaces/openai_streaming_interface.py index 0ff2c6fb..bf44867a 100644 --- a/letta/interfaces/openai_streaming_interface.py +++ b/letta/interfaces/openai_streaming_interface.py @@ -166,7 +166,7 @@ class OpenAIStreamingInterface: except Exception as e: import traceback - logger.error("Error processing stream: %s", e, traceback.format_exc()) + logger.error("Error processing stream: %s\n%s", e, traceback.format_exc()) ttft_span.add_event( name="stop_reason", attributes={"stop_reason": StopReasonType.error.value, "error": str(e), "stacktrace": traceback.format_exc()},