Mastra Workflow Streaming Issue Vercel AI SDK v5 - Need Help!
Following the workflow streaming docs but can't get it working with Vercel AI SDK's useChat hook. My code (from docs):
Chunks: workflow-start → workflow-step-start → workflow-step-result
(No workflow-step-output with text chunks)
vs Agent stream (works fine):
AISDKV5OutputStream:

// Workflow step - pipe agent to writer
const stream = await agent?.stream(messages, { format: 'aisdk' });
await stream.textStream.pipeTo(writer);// Endpoint - stream workflow
const stream = run.streamVNext({ inputData: { messages }, format: 'aisdk' });
return stream.toUIMessageStreamResponse(); // ❌ not a function
Stream inspection shows:
MastraWorkflowStream:
- Has toUIMessageStreamResponse: false ❌
- Has toDataStreamResponse: false ❌
- Methods: constructor, status, result, usageChunks: workflow-start → workflow-step-start → workflow-step-result
(No workflow-step-output with text chunks)
vs Agent stream (works fine):
AISDKV5OutputStream:
- Has toUIMessageStreamResponse: true
- Emits proper text-delta chunks
- How do I convert MastraWorkflowStream to AI SDK format for useChat?
- Should pipeTo(writer) emit workflow-step-output events? Not seeing them
- Is there a transformer utility I'm missing?