mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
Allow dynamic tool calls to execute in parallel (#54654)
## Why Dynamic tool calls should remain independent while waiting for client responses, so one pending call does not block another from reaching the client. ## What changed Enable parallel execution in `DynamicToolHandler`, allowing code mode programs to issue concurrent dynamic tool calls with `Promise.all`. ## Testing Add a code mode regression test that waits for two dynamic tool requests before responding, resolves them in reverse order, and verifies that `Promise.all` preserves the expected result order. GitOrigin-RevId: c93c1fea720f76c772b0e3452ddc8c01fb1a08d8
This commit is contained in:
@@ -85,6 +85,10 @@ impl DynamicToolHandler {
|
||||
}
|
||||
|
||||
impl ToolExecutor<ToolInvocation> for DynamicToolHandler {
|
||||
fn supports_parallel_tool_calls(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn tool_name(&self) -> ToolName {
|
||||
self.tool_name.clone()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user