From 256135e18a00a33ee15dc064ff4c6743cd48d2b3 Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Mon, 23 Mar 2026 14:48:06 +0100 Subject: [PATCH] open_ai: Enable parallel tool calling for models that support it (#52203) ## Context We seemed to have disabled it in #28056, because our agent did not support parallel tool calls at the time. ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A or Added/Fixed/Improved ... --- crates/language_models/src/provider/open_ai.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/language_models/src/provider/open_ai.rs b/crates/language_models/src/provider/open_ai.rs index 2548a6b26f39dbb67add7262fc4b2796c1d8306f..8de1eaaf8465cf48838c49f6b24d3eb16d6e3487 100644 --- a/crates/language_models/src/provider/open_ai.rs +++ b/crates/language_models/src/provider/open_ai.rs @@ -514,8 +514,7 @@ pub fn into_open_ai( temperature: request.temperature.or(Some(1.0)), max_completion_tokens: max_output_tokens, parallel_tool_calls: if supports_parallel_tool_calls && !request.tools.is_empty() { - // Disable parallel tool calls, as the Agent currently expects a maximum of one per turn. - Some(false) + Some(supports_parallel_tool_calls) } else { None },