Error in agent stream { error: 370 | // this results in a bunch of weird separated text chunks on the message instead of combined chunks 371 | // easiest solution here is to just not flush for response-metadata 372 | // BUT does this cause other issues? 373 | // Alternative solution: in message list allow combining text deltas together when the message source is "response" and the text parts are directly next to each other 374 | // simple solution for now is to not flush text deltas on response-metadata 375 | chunk.type!=="response-metadata"&&runState.state.isStreaming){if(runState.state.textDeltas.length){const textStartPayload=chunk.payload;const providerMetadata=textStartPayload.providerMetadata??runState.state.providerOptions;messageList.add({id:messageId,role:"assistant",content:[providerMetadata?{type:"text",text:runState.state.textDeltas.join(""),providerOptions:providerMetadata}:{type:"text",text:runState.state.textDeltas.join("")}]},"response");}runState.setState({isStreaming:false,textDeltas:[]});}switch(chunk.type){case "response-metadata":runState.setState({responseMetadata:{id:chunk.payload.id,timestamp:chunk.payload.timestamp,modelId:chunk.payload.modelId,headers:chunk.payload.headers}});break;case "text-delta":{const textDeltasFromState=runState.state.textDeltas;textDeltasFromState.push(chunk.payload.text);runState.setState({textDeltas:textDeltasFromState,isStreaming:true});if(isControllerOpen(controller)){controller.enqueue(chunk);}break;}case "tool-call-input-streaming-start":{const tool=tools?.[c | ... truncated error: {"name":"AI_TypeValidationError","cause":"Validation failed","value":{"primitiveId":"liveSupport","primitiveType":"tool","prompt":{},"selectionReason":"The user requested to connect to live support, which is best handled by the liveSupport tool. Other primitives like baseChat or chatResolution are not suitable for this request."}} at processOutputStream (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:375:4048) at /Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:76:131 at /Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:76:131 at /Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:76:131 at processTicksAndRejections (native:7:39) , runId: "d7afa14b-6600-4923-9a0d-2bd0d74ddd92", } Error executing step routing-agent-step: Error: {"name":"AI_TypeValidationError","cause":"Validation failed","value":{"primitiveId":"liveSupport","primitiveType":"tool","prompt":{},"selectionReason":"The user requested to connect to live support, which is best handled by the liveSupport tool. Other primitives like baseChat or chatResolution are not suitable for this request."}} at (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:776:1963) at transform (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:773:1313) at (native:1:11) at (native:1:11) at (native:1:11) at (native:1:11) at (native:1:11) at (native:1:11) at (native:1:11) at (native:7:62) at processTicksAndRejections (native:7:39) Error executing step Agent-Network-Outer-Workflow: Error: Error: {"name":"AI_TypeValidationError","cause":"Validation failed","value":{"primitiveId":"liveSupport","primitiveType":"tool","prompt":{},"selectionReason":"The user requested to connect to live support, which is best handled by the liveSupport tool. Other primitives like baseChat or chatResolution are not suitable for this request."}} at (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:776:1963) at transform (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:773:1313) at (native:1:11) at (native:1:11) at (native:1:11) at (native:1:11) at (native:1:11) at (native:1:11) at (native:1:11) at (native:7:62) at processTicksAndRejections (native:7:39) at preprocessExecutionError (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:212:103) at executeStep (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:233:606) at async executeLoop (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:234:3520) at async executeEntry (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:237:3277) at async execute (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:227:915) at async _start (/Users/alnzy/Documents/Projects/ds/ds-chat/node_modules/@mastra/core/dist/chunk-JKLLXBOY.js:309:1921) at processTicksAndRejections (native:7:39)