From 1f0915a7d41abec0db7a459417646702a7612d09 Mon Sep 17 00:00:00 2001 From: Rehan-Ul-Haq Date: Wed, 28 May 2025 09:48:56 +0500 Subject: [PATCH 1/2] Fix default value for parallel_tool_calls in ModelSettings --- src/agents/model_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agents/model_settings.py b/src/agents/model_settings.py index 7b016c98f..3e9c9fe4c 100644 --- a/src/agents/model_settings.py +++ b/src/agents/model_settings.py @@ -37,7 +37,7 @@ class ModelSettings: parallel_tool_calls: bool | None = None """Whether to use parallel tool calls when calling the model. - Defaults to False if not provided.""" + Defaults to True if not provided.""" truncation: Literal["auto", "disabled"] | None = None """The truncation strategy to use when calling the model.""" From 077c17b4a030ed5082fc852f535054288be8f697 Mon Sep 17 00:00:00 2001 From: Rehan-Ul-Haq Date: Sun, 1 Jun 2025 20:27:50 +0500 Subject: [PATCH 2/2] Improve documentation for parallel_tool_calls in ModelSettings --- src/agents/model_settings.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/agents/model_settings.py b/src/agents/model_settings.py index 3e9c9fe4c..a06ab2899 100644 --- a/src/agents/model_settings.py +++ b/src/agents/model_settings.py @@ -36,8 +36,13 @@ class ModelSettings: """The tool choice to use when calling the model.""" parallel_tool_calls: bool | None = None - """Whether to use parallel tool calls when calling the model. - Defaults to True if not provided.""" + """Controls whether the model can make multiple parallel tool calls in a single turn. + If not provided (i.e., set to None), this behavior defers to the underlying + model provider's default. For most current providers (e.g., OpenAI), this typically + means parallel tool calls are enabled (True). + Set to True to explicitly enable parallel tool calls, or False to restrict the + model to at most one tool call per turn. + """ truncation: Literal["auto", "disabled"] | None = None """The truncation strategy to use when calling the model."""