From 337e27f39bd17206602245ede91493be7f1542e7 Mon Sep 17 00:00:00 2001 From: Natalie Kong <186588905+Nataliekooong@users.noreply.github.com> Date: Sat, 26 Sep 2026 00:35:47 -0400 Subject: [PATCH] fix(streaming): drop redundant model_ prefix check in delta loop --- litellm/litellm_core_utils/model_response_utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/litellm/litellm_core_utils/model_response_utils.py b/litellm/litellm_core_utils/model_response_utils.py index a378c160077..77d85c52404 100644 --- a/litellm/litellm_core_utils/model_response_utils.py +++ b/litellm/litellm_core_utils/model_response_utils.py @@ -197,12 +197,7 @@ def _is_delta_non_empty(delta: Delta) -> bool: # Check all regular attributes of the delta object for attr_name in dir(delta): # Skip private attributes, methods, and Pydantic-specific fields - if ( - attr_name.startswith("_") - or attr_name.startswith("model_") - or callable(_attribute_of(delta, attr_name)) - or attr_name.startswith("model_") - ): + if attr_name.startswith("_") or attr_name.startswith("model_") or callable(_attribute_of(delta, attr_name)): continue delta_attr_value: object = getattr(delta, attr_name, None)