Agent Zero AI framework
fix: add reasoning field fallback in ChatCompletionsTransport.parse (#1731)
Jeremy Jones9aca3adbb856
diff --git a/helpers/litellm_transport.py b/helpers/litellm_transport.pyindex d9e84fce7..875f264a2 100644--- a/helpers/litellm_transport.py+++ b/helpers/litellm_transport.py@@ -588,9 +588,13 @@ class ChatCompletionsTransport:response_delta = _get_value(delta, "content") or _get_value(message, "content") or ""- reasoning_delta = _get_value(delta, "reasoning_content") or _get_value(- message, "reasoning_content"- ) or ""+ reasoning_delta = (+ _get_value(delta, "reasoning_content")+ or _get_value(message, "reasoning_content")+ or _get_value(delta, "reasoning")+ or _get_value(message, "reasoning")+ or ""+ )reasoning_delta = (reasoning_filter or _ChatReasoningFilter()).feed(reasoning_delta, final=reasoning_filter is None)