diff --git a/litellm/integrations/websearch_interception/handler.py b/litellm/integrations/websearch_interception/handler.py index 5077528af50..7bbafc8d8c6 100644 --- a/litellm/integrations/websearch_interception/handler.py +++ b/litellm/integrations/websearch_interception/handler.py @@ -949,9 +949,7 @@ class WebSearchInterceptionLogger(CustomLogger): if not native_blocks: return response if isinstance(response, _MutableMappingLike) and isinstance(response, dict): - response["content"] = WebSearchInterceptionLogger._prepended_content( - response.get("content"), native_blocks - ) + response["content"] = WebSearchInterceptionLogger._prepended_content(response.get("content"), native_blocks) return response if isinstance(response, _HasContent): try: diff --git a/litellm/llms/anthropic/chat/guardrail_translation/handler.py b/litellm/llms/anthropic/chat/guardrail_translation/handler.py index 0d65d4058cd..afd491c5569 100644 --- a/litellm/llms/anthropic/chat/guardrail_translation/handler.py +++ b/litellm/llms/anthropic/chat/guardrail_translation/handler.py @@ -1163,9 +1163,7 @@ class AnthropicMessagesHandler(BaseTranslation): """ try: sse_string: Final = sse_bytes.decode("utf-8") - return "".join( - self._sse_text_delta(event) for event in sse_string.split("\n\n") if event.strip() - ) + return "".join(self._sse_text_delta(event) for event in sse_string.split("\n\n") if event.strip()) except Exception as e: verbose_proxy_logger.error("Error extracting text from SSE: %s", e) return ""