From 5a9ec6144666ae9b958a7cbc5152bf4a5a46b76f Mon Sep 17 00:00:00 2001 From: Weves Date: Tue, 18 Feb 2025 18:56:28 -0800 Subject: [PATCH] Don't pass thorugh parallel_tool_calls for o-family models --- backend/onyx/llm/chat_llm.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/onyx/llm/chat_llm.py b/backend/onyx/llm/chat_llm.py index fe131fb62b5c..8a16333acfed 100644 --- a/backend/onyx/llm/chat_llm.py +++ b/backend/onyx/llm/chat_llm.py @@ -434,7 +434,17 @@ class DefaultMultiLLM(LLM): # or else OpenAI throws an error **( {"parallel_tool_calls": False} - if tools and self.config.model_name != "o3-mini" + if tools + and self.config.model_name + not in [ + "o3-mini", + "o3-preview", + "o1", + "o1-preview", + "o1-mini", + "o1-mini-2024-09-12", + "o3-mini-2025-01-31", + ] else {} ), # TODO: remove once LITELLM has patched **(