-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(langchain): only create tools node for client tools #9074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(langchain): only create tools node for client tools #9074
Conversation
Fixes unreachable node error when using server-side tools (like Anthropic's code_execution, web_search, bash) with createAgent. Previously, the tools node was created whenever ANY tools were passed, but only client tools (Runnables) need the tools node for local execution. Server tools (plain objects) are executed by the provider and return results in the message content, not as tool_calls.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@pokey is attempting to deploy a commit to the LangChain Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, let's apply the same change, and integration test to the non-middleware agent.
Done. I just copied to test over ~verbatim. Is there a better way to do it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Fixes unreachable node error when using server-side tools (like Anthropic's code_execution, web_search, bash) with createAgent.
Previously, the tools node was created whenever ANY tools were passed, but only client tools (Runnables) need the tools node for local execution. Server tools (plain objects) are executed by the provider and return results in the message content, not as tool_calls.
Fixes # (issue)