Im currently following Research Canvas demo and I tried swapping in Gemini. For some reason Gemini causes a remove message return:
[ERROR] Background run failed. Exception: Unable to coerce message from array: only human, AI, system, developer, or tool message coercion is currently supported.
Received: {
"id": [
"langchain_core",
"messages",
"RemoveMessage"
],
"lc": 1,
"type": "constructor",
"kwargs": {
"id": "3e54d6ba-2dbf-4066-8b6b-44123fa63340",
"content": "",
"additional_kwargs": {},
"response_metadata": {}
}
}
Troubleshooting URL: https://js.langchain.com/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE/
this only happens when it uses a tool and I query it again. for some reason remove message messages are being included that causes coercion failure