From 4e9ea80c160b4e8737436b860ec9f53831c00bae Mon Sep 17 00:00:00 2001 From: Padma Date: Fri, 9 Oct 2026 12:11:42 +0000 Subject: [PATCH] fix(ollama_chat): drop no-op except to stay under the complexity limit chunk_parser was exactly at the C901 limit, so the new error check pushed it over. The except Exception: raise e block only re-raised the same error, so removing it keeps behavior the same and brings the function back to the limit. --- litellm/llms/ollama/chat/transformation.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/litellm/llms/ollama/chat/transformation.py b/litellm/llms/ollama/chat/transformation.py index 7b255611c12..8c7c8a1b269 100644 --- a/litellm/llms/ollama/chat/transformation.py +++ b/litellm/llms/ollama/chat/transformation.py @@ -567,5 +567,3 @@ class OllamaChatCompletionResponseIterator(BaseModelResponseIterator): status_code=400, headers={"Content-Type": "application/json"}, ) - except Exception as e: - raise e