Skip to content

Commit e9e1c89

Browse files
committed
fix: retain existing bound params
1 parent 79782ee commit e9e1c89

File tree

1 file changed

+6
-2
lines changed
  • packages/toolbox-core/src/toolbox_core

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ def add_auth_token_getters(
240240
)
241241

242242
def bind_parameters(
243-
self, bound_params: Mapping[str, Union[Callable[[], Any], Any]]
243+
self,
244+
bound_params: Mapping[str, Union[Callable[[], Any], Any]]
244245
) -> "ToolboxTool":
245246
"""
246247
Binds parameters to values or callables that produce values.
@@ -261,10 +262,13 @@ def bind_parameters(
261262
for p in self.__params:
262263
if p.name not in bound_params:
263264
new_params.append(p)
265+
266+
all_bound_params = dict(self.__bound_parameters)
267+
all_bound_params.update(bound_params)
264268

265269
return self.__copy(
266270
params=new_params,
267-
bound_params=bound_params,
271+
bound_params=types.MappingProxyType(all_bound_params),
268272
)
269273

270274

0 commit comments

Comments
 (0)