Skip to content
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

Bug: Running Tools in parallel within LangGraph returns a "does not match existing tool call" error #1235

Closed
jfturcot opened this issue Dec 5, 2024 · 4 comments

Comments

@jfturcot
Copy link

jfturcot commented Dec 5, 2024

I am running into an issue with parallel executions of tools within LangGraph.

You can easily reproduce the issue by running the following graph:
https://github.com/langchain-ai/langchain-academy/tree/main/module-6/deployment

Using this graph, when sending a prompt like "My name is John," it will send you to the update_profile node, which uses Trustcall to update a JSON payload in its memory to store some information about the user. Trustcall runs a Tool called PatchDoc, but the update_profile also runs a Profile Tool.

Doing so raises this error:

Error: Tool call name call_NAnT466ldLHgmgBdeA3xoS6E Profile does not match existing tool call PatchDoc

The issue seems to be within the joinExternalMessages function on the file runtimes/external-store/external-message-converter.tsx that does not expect to receive messages from 2 different tools before one is completed.

@Yonom
Copy link
Member

Yonom commented Dec 18, 2024

Thank you for reporting this! I am able to reproduce this issue and am working on a fix

@Yonom
Copy link
Member

Yonom commented Jan 14, 2025

Hi @jfturcot, thanks and sorry about the long wait.

I just rewrote the langgraph message stream parser - hopefully this should have fixed the bug. I am no longer able to reproduce the bug anymore on my end.

Let me know if you still experience issues

@Yonom Yonom closed this as completed Jan 14, 2025
@jfturcot
Copy link
Author

@Yonom thank you! This is awesome.

I unfortunately had to move to a different framework due to a deadline approaching quickly, but I'll check it out again on a future project.

@nikhilpi
Copy link

Hi @Yonom, I am still getting this error with trustcall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants