The payload is malformed. There is a thinking sequence but no \"AI\" messages to append thinking blocks to.\n #7855
Replies: 3 comments
-
We're running into this on 0.7.9-rc1 with Claude 3.7 in Bedrock as well. |
Beta Was this translation helpful? Give feedback.
-
Same Issue here, also running v0.7.9-rc1 |
Beta Was this translation helpful? Give feedback.
-
In case anyone sees this, I saw this problem with Bedrock Claude 4 when the context size of the model I was using for an agent was smaller than the result of a tool call the agent performed added to the existing context. That is to say, previous_context_size + result_of_tool_call > max_context_size. Just increase your context size, and hopefully the issue will just go away. It's not a helpful error message for people using LibreChat though, doesn't suggest what the problem was at all. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm getting
The payload is malformed. There is a thinking sequence but no \"AI\" messages to append thinking blocks to.\n
once in a while. What could be the reason? This is aws bedrock claude 3.7{"level":"error","message":"[api/server/controllers/agents/client.js #sendCompletion] Operation aborted The payload is malformed. There is a thinking sequence but no \"AI\" messages to append thinking blocks to.","pregelTaskId":"a1858825-c898-5410-b1f3-181c5cd58595","stack":"Error: The payload is malformed. There is a thinking sequence but no \"AI\" messages to append thinking blocks to.\n at getMessagesWithinTokenLimit (/app/node_modules/@librechat/agents/dist/cjs/messages/prune.cjs:195:15)\n at StandardGraph.pruneMessages (/app/node_modules/@librechat/agents/dist/cjs/messages/prune.cjs:344:49)\n at RunnableCallable.func (/app/node_modules/@librechat/agents/dist/cjs/graphs/Graph.cjs:328:62)\n at /app/node_modules/@langchain/langgraph/dist/utils.cjs:88:126\n at AsyncLocalStorage.run (node:async_hooks:346:14)\n at AsyncLocalStorageProvider.runWithConfig (/app/node_modules/@langchain/core/dist/singletons/async_local_storage/index.cjs:60:24)\n at RunnableCallable.invoke (/app/node_modules/@langchain/langgraph/dist/utils.cjs:88:81)\n at RunnableSequence.invoke (/app/node_modules/@langchain/core/dist/runnables/base.cjs:1299:38)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async _runWithRetry (/app/node_modules/@langchain/langgraph/dist/pregel/retry.cjs:76:22)"}
Beta Was this translation helpful? Give feedback.
All reactions