Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: Turn parallel tool calling off for OpenAI (#2737)

Matthew Zhoub53be62e7ac1
diff --git a/letta/llm_api/openai_client.py b/letta/llm_api/openai_client.py
index e0ea6187d..56ca5f427 100644
--- a/letta/llm_api/openai_client.py
+++ b/letta/llm_api/openai_client.py
@@ -217,6 +217,7 @@ class OpenAIClient(LLMClientBase):
messages=fill_image_content_in_messages(openai_message_list, messages),
tools=[OpenAITool(type="function", function=f) for f in tools] if tools else None,
tool_choice=tool_choice,
+ parallel_tool_calls=False if tools else None, # Forcibly disable parallel tool calling
user=str(),
max_completion_tokens=llm_config.max_tokens,
# NOTE: the reasoners that don't support temperature require 1.0, not None