mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Enforce strict tool name collision errors (#37020)
## What changed - Track the first duplicate effective tool name while assembling the tool registry, including collisions introduced by external tools, code mode, and tool search. - When `[features.tool_registry].error_on_tool_collisions` is enabled, fail the turn with a `duplicate tool: <namespace>.<name>` error before sending a model request. - Continue allowing identical tool names in different namespaces, and preserve the existing collision behavior when strict checking is disabled. ## Testing - Cover registry collision tracking, strict tool planning across tool sources, namespace isolation, failure before sampling, and pre-sampling compaction. GitOrigin-RevId: 4cf83538fb513cec0b9c8b567780caaaadd3243d
This commit is contained in:
1 parent
5d89ab65dc
commit
1e489adad0
13 files changed
+374
-17
No files matched your search
@@ -96,6 +96,7 @@ impl ToolRouter {
|
||||
hosted_specs,
|
||||
tool_search_handler_cache,
|
||||
)
|
||||
.expect("test tool registry should not contain duplicate tools")
|
||||
}
|
||||
|
||||
pub(crate) fn from_parts(registry: ToolRegistry, model_visible_specs: Vec<ToolSpec>) -> Self {
|
||||
|
||||
Reference in new issue
Block a user