Undefined tool response
If I attach this tool directly to the flow, everything works correctly. It also works when the prompt is not intended to call any of its tools.
The last two messages from the generateStream method are as follows:
{
"role": "tool",
"content": [
{
"toolResponse": {
"name": "competitorAnalysisAgent",
"output": "transferred to competitorAnalysisAgent"
}
}
]
},
// Here there should be a tool request and its response but the model answers with “undefined”
{
"role": "model",
"content": [
{
"text": "undefined\n"
}
]
}
Any idea what might be wrong?