From 7d279da7e1c890c287c887ba26e1e2df6e3f3ff8 Mon Sep 17 00:00:00 2001 From: rain <1504569896@qq.com> Date: Wed, 23 Sep 2026 16:45:36 +0800 Subject: [PATCH] style: apply ruff format to responses system-text extraction --- .../litellm_responses_transformation/transformation.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/litellm/completion_extras/litellm_responses_transformation/transformation.py b/litellm/completion_extras/litellm_responses_transformation/transformation.py index 0c29f4ae0a7..9a51e31a3d4 100644 --- a/litellm/completion_extras/litellm_responses_transformation/transformation.py +++ b/litellm/completion_extras/litellm_responses_transformation/transformation.py @@ -516,15 +516,11 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge): return content if isinstance(content, list): if any( - not isinstance(block, dict) - or block.get("type") != "text" - or "cache_control" in block + not isinstance(block, dict) or block.get("type") != "text" or "cache_control" in block for block in content ): return None - text_parts: Final = tuple( - block["text"] for block in content if isinstance(block.get("text"), str) - ) + text_parts: Final = tuple(block["text"] for block in content if isinstance(block.get("text"), str)) return "".join(text_parts) if text_parts else None return None