From 762ac9e8b1e64443565b4b9741cb496dfe85cf36 Mon Sep 17 00:00:00 2001 From: sauravniraula Date: Mon, 8 Sep 2025 00:30:16 +0545 Subject: [PATCH] fix(fastapi): llm client issue where tool call arguments is None while streaming (openai) --- servers/fastapi/services/llm_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/fastapi/services/llm_client.py b/servers/fastapi/services/llm_client.py index 6fb8ec4e..72205c93 100644 --- a/servers/fastapi/services/llm_client.py +++ b/servers/fastapi/services/llm_client.py @@ -886,7 +886,7 @@ class LLMClient: current_id = tool_id or current_id if current_arguments is None: current_arguments = tool_arguments - else: + elif tool_arguments: current_arguments += tool_arguments if current_id is not None: @@ -1233,7 +1233,7 @@ class LLMClient: current_id = tool_id or current_id if current_arguments is None: current_arguments = tool_arguments - else: + elif tool_arguments: current_arguments += tool_arguments if current_name == "ResponseSchema":