AI SDK workflowRoute does not pass through runtimeContext/requestContext

Using the mastra/ai-sdk workflowRoute, if you set runtimeContext variables in your middleware, they are not received by the workflow. chatRoute does properly pass runtimeContext, because tool calls by that agent do receive the variables.
2 Replies
LekoArts
LekoArts2w ago
Hello! We merged and released https://github.com/mastra-ai/mastra/pull/10427 Are you using the latest Mastra versions?
GitHub
Fix: Forward request context set in middleware to workflows in work...
Description This PR adds ability to forward requestContext set in middleware in workflowRoute similar to chatRoute. Changes were made based on chatRoute implementation. Similar to chatRoute adds w...
Vulcano
VulcanoOP2w ago
Whoops, okay yeah I was on 0.3.1 and did not see that PR. Ill close this thread

Did you find this page helpful?