RunnableConfig not passed to DynamicTool with ToolNode #110

Closed
opened 2026-02-15 17:15:54 -05:00 by yindo · 2 comments
Owner

Originally created by @robertszalai on GitHub (Oct 13, 2024).

I try to pass RunnableConfig to a tool used with ToolNode. I create the tool with tool() and as I see in the source code if there's no schema or I use a string schema a DynamicTool is created instead of DynamicStructuredTool. The tool is invoked with (input, runManager, config), but with DynamicTool the config is not passed correctly, because it doesn't have a wrapper as with DynamicStructuredTool. The result is that the second (config) param in my tool function is undefined.

Originally created by @robertszalai on GitHub (Oct 13, 2024). I try to pass `RunnableConfig` to a tool used with `ToolNode`. I create the tool with `tool()` and as I see in the source code if there's no schema or I use a string schema a `DynamicTool` is created instead of `DynamicStructuredTool`. The tool is invoked with `(input, runManager, config)`, but with `DynamicTool` the config is not passed correctly, because it doesn't have a wrapper as with `DynamicStructuredTool`. The result is that the second (config) param in my tool function is undefined.
yindo closed this issue 2026-02-15 17:15:54 -05:00
Author
Owner

@jacoblee93 commented on GitHub (Oct 13, 2024):

Oof, thanks for the heads up. Will patch in https://github.com/langchain-ai/langchainjs

@jacoblee93 commented on GitHub (Oct 13, 2024): Oof, thanks for the heads up. Will patch in https://github.com/langchain-ai/langchainjs
Author
Owner

@jacoblee93 commented on GitHub (Oct 13, 2024):

A fix for this is live in @langchain/core@0.3.11, thanks again!

@jacoblee93 commented on GitHub (Oct 13, 2024): A fix for this is live in `@langchain/core@0.3.11`, thanks again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#110