MCP Tool Error - "Invalid tool call structure: No preceding AIMessage with tool_call_ids" #6515
Replies: 3 comments 5 replies
-
Claude Sonnet 3.7 can be way too proactive when creating Github issues, lol...let me know what additional info you need. It's been happening a lot with the Bedrock model lately, but I also recently upgraded from v0.7.6 to 0.7.7. Prior to that, I'd never ran into this particular issue before. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
3 replies
-
I was able to export a .json file of one of the conversations. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
When using MCP tools in LibreChat, I'm occasionally encountering an error that prevents the conversation from continuing and blocks export functionality.
Error Message
Impact
Environment
Technical Analysis
Based on the error stack trace, the issue occurs in the message formatting process:
formatAssistantMessage
function at line 161 ofmessages/format.cjs
This appears to be a race condition or state management issue in how tool calls are being tracked and associated with AI messages.
Reproduction
This error occurs randomly during conversations with MCP tools enabled, making it difficult to provide exact reproduction steps. However, it seems to happen more frequently during longer conversations with multiple tool calls.
Additional Context
Additional logs might be available in "C:\LibreChat\api\logs" which could provide more context about the specific conditions leading to this error.
Beta Was this translation helpful? Give feedback.
All reactions