Supervisor Agent failing to invoke underlying agents
The Problem
My workflow is invoking the supervisor agent as a workflow step [The agent is usinggpt-4o] and this agent is supposed to route/invoke the right specialized agent, however the supervisor agent is throwing error that use streamVNext, I am guessing mastra is internally using stream which is causing this error, since nowhere I am explicitly invoking the specialized agents.What's Happening
- You create a workflow that includes an supervisor agent step
- The workflow runs and reaches the agent step
- Mastra's execution engine tries to stream the agent's response using the old Agent.stream() method
- AI SDK V2 rejects the legacy streaming method and throws an error
- The entire workflow fails and stops execution
V2 models are not supported for stream. Please use streamVNext instead. { modelId: 'gpt-4o' }
Error executing step supervisor-router-agent: Error: V2 models are not supported for stream. Please use streamVNext instead.