fix(streaming): drop redundant model_ prefix check in delta loop

This commit is contained in:
Natalie Kong 2026-09-26 00:35:47 -04:00
parent eb6164ca7d
commit 337e27f39b

View file

@ -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)