Skip to content

Commit 29016c2

Browse files
committed
fix: Add the no parameter check back again.
We will remove this once we actually implement the `strict` flag and centralize this functionality by moving this check to the tool's constructor in a future PR.
1 parent a8974de commit 29016c2

File tree

1 file changed

+3
-0
lines changed
  • packages/toolbox-core/src/toolbox_core

1 file changed

+3
-0
lines changed

packages/toolbox-core/src/toolbox_core/tool.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,10 @@ def bind_parameters(
286286
Returns:
287287
A new ToolboxTool instance with the specified parameters bound.
288288
"""
289+
param_names = set(p.name for p in self.__params)
289290
for name in bound_params.keys():
291+
if name not in param_names:
292+
raise Exception(f"unable to bind parameters: no parameter named {name}")
290293
if name in self.__bound_parameters:
291294
raise ValueError(
292295
f"cannot re-bind parameter: parameter '{name}' is already bound"

0 commit comments

Comments
 (0)