From 23f492100d85fe7de0867345b2e754c8851bfa21 Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Tue, 11 Feb 2025 14:18:13 -0800 Subject: [PATCH] nit --- llama_stack/providers/utils/inference/openai_compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_stack/providers/utils/inference/openai_compat.py b/llama_stack/providers/utils/inference/openai_compat.py index 2fd157cc0..f4dcfb96e 100644 --- a/llama_stack/providers/utils/inference/openai_compat.py +++ b/llama_stack/providers/utils/inference/openai_compat.py @@ -190,7 +190,7 @@ def process_chat_completion_response( if not request.tools: raw_message.tool_calls = [] raw_message.content = text_from_choice(choice) - elif request.tools: + else: # only return tool_calls if provided in the request new_tool_calls = [] request_tools = {t.tool_name: t for t in request.tools}