mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
[codex] enable parallel standalone web search calls (#25702)
## Summary - opt the extension-backed standalone `web.run` tool into parallel tool execution - update the existing extension registration test to assert that the tool advertises parallel-call support ## Why The standalone web-search API endpoint now supports parallel requests. The extension executor still inherited the shared serial default, causing multiple `web.run` calls to acquire the exclusive runtime lock. ## Impact Models that emit multiple standalone web-search calls can now execute them concurrently when model-level parallel tool calls are enabled. ## Validation - `just fmt` - `just test -p codex-web-search-extension` - `git diff --check origin/main...HEAD`
This commit is contained in:
1 parent
6536841d89
commit
b3c4157034
2 files changed
+6
-2
No files matched your search
@@ -169,12 +169,12 @@ mod tests {
|
|||||||
.tool_contributors()
|
.tool_contributors()
|
||||||
.iter()
|
.iter()
|
||||||
.flat_map(|contributor| contributor.tools(&session_store, &thread_store))
|
.flat_map(|contributor| contributor.tools(&session_store, &thread_store))
|
||||||
.map(|tool| tool.tool_name())
|
.map(|tool| (tool.tool_name(), tool.supports_parallel_tool_calls()))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
tool_names,
|
tool_names,
|
||||||
vec![ToolName::namespaced(WEB_NAMESPACE, RUN_TOOL_NAME)]
|
vec![(ToolName::namespaced(WEB_NAMESPACE, RUN_TOOL_NAME), true)]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,6 +70,10 @@ impl ToolExecutor<ToolCall> for WebSearchTool {
|
|||||||
ToolExposure::DirectModelOnly
|
ToolExposure::DirectModelOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn supports_parallel_tool_calls(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
async fn handle(&self, call: ToolCall) -> Result<Box<dyn ToolOutput>, FunctionCallError> {
|
async fn handle(&self, call: ToolCall) -> Result<Box<dyn ToolOutput>, FunctionCallError> {
|
||||||
let commands = parse_commands(&call)?;
|
let commands = parse_commands(&call)?;
|
||||||
let command_action = command_action(&commands);
|
let command_action = command_action(&commands);
|
||||||
|
|||||||
Reference in new issue
Block a user