diff --git a/litellm/types/utils.py b/litellm/types/utils.py index 532162e60f..4385bf8023 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -730,7 +730,8 @@ class Delta(OpenAIObject): def get(self, key, default=None): # Custom .get() method to access attributes with a default value if the attribute doesn't exist - return getattr(self, key, default) + value = getattr(self, key, default) + return default if value is None else value def __getitem__(self, key): # Allow dictionary-style access to attributes