December 18, 2025
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use LanguageModelV3 models from AI SDK v6 beta providers like @ai-sdk/openai@^3.0.0-beta.
New features:
reasoningTokens, cachedInputTokens, and raw data preserved in a raw fieldBackward compatible: All existing V1 and V2 models continue to work unchanged.
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use LanguageModelV3 models from AI SDK v6 beta providers like @ai-sdk/openai@^3.0.0-beta.
New features:
reasoningTokens, cachedInputTokens, and raw data preserved in a raw fieldBackward compatible: All existing V1 and V2 models continue to work unchanged.
Fix requestContext not being forwarded from middleware in chatRoute and networkRoute (b7b0930)
Previously, when using middleware to set values in requestContext (e.g., extracting agentId and organizationId from the request body), those values were not properly forwarded to agents, tools, and workflows when using chatRoute and networkRoute from the AI SDK.
This fix ensures that requestContext set by middleware is correctly prioritized and forwarded with the following precedence:
Resolves #11192
This change introduces three major breaking changes to the Auth0 authentication provider. These updates make token verification safer, prevent server crashes, and ensure proper authorization checks. (#10632)
authenticateToken() now fails safely instead of throwingauthorizeUser() now performs meaningful security checksThese changes improve stability, prevent runtime crashes, and enforce safer authentication & authorization behavior throughout the system.
feat: Add field filtering and nested workflow control to workflow execution result endpoint (#11246)
Adds two optional query parameters to /api/workflows/:workflowId/runs/:runId/execution-result endpoint:
fields: Request only specific fields (e.g., status, result, error)withNestedWorkflows: Control whether to fetch nested workflow dataThis significantly reduces response payload size and improves response times for large workflows.
# Get only status (minimal payload - fastest)
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status
# Get status and result
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,result
# Get all fields but without nested workflow data (faster)
GET /api/workflows/:workflowId/runs/:runId/execution-result?withNestedWorkflows=false
# Get only specific fields without nested workflow data
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,steps&withNestedWorkflows=false
# Get full data (default behavior)
GET /api/workflows/:workflowId/runs/:runId/execution-result
import { MastraClient } from '@mastra/client-js';
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
const workflow = client.getWorkflow('myWorkflow');
// Get only status (minimal payload - fastest)
const statusOnly = await workflow.runExecutionResult(runId, {
fields: ['status'],
});
console.log(statusOnly.status); // 'success' | 'failed' | 'running' | etc.
// Get status and result
const statusAndResult = await workflow.runExecutionResult(runId, {
fields: ['status', 'result'],
});
// Get all fields but without nested workflow data (faster)
const resultWithoutNested = await workflow.runExecutionResult(runId, {
withNestedWorkflows: false,
});
// Get specific fields without nested workflow data
const optimized = await workflow.runExecutionResult(runId, {
fields: ['status', 'steps'],
withNestedWorkflows: false,
});
// Get full execution result (default behavior)
const fullResult = await workflow.runExecutionResult(runId);
The Workflow.getWorkflowRunExecutionResult method now accepts an options object:
await workflow.getWorkflowRunExecutionResult(runId, {
withNestedWorkflows: false, // default: true, set to false to skip nested workflow data
fields: ['status', 'result'], // optional field filtering
});
The @mastra/inngest package has been updated to use the new options object API. This is a non-breaking internal change - no action required from inngest workflow users.
For workflows with large step outputs:
status: ~99% reduction in payload sizestatus,result,error: ~95% reduction in payload sizewithNestedWorkflows=false: Avoids expensive nested workflow data fetchingFix delayed promises rejecting when stream suspends on tool-call-approval (#11278)
When a stream ends in suspended state (e.g., requiring tool approval), the delayed promises like toolResults, toolCalls, text, etc. now resolve with partial results instead of rejecting with an error. This allows consumers to access data that was produced before the suspension.
Also improves generic type inference for LLMStepResult and related types throughout the streaming infrastructure.
Fixed Convex schema exports to support import in convex/schema.ts files. (#11242)
Previously, importing table definitions from @mastra/convex/server failed in Convex schema files because it transitively imported Node.js runtime modules (crypto, fs, path) that are unavailable in Convex's deploy-time sandbox.
Changes
@mastra/convex/schema that provides table definitions without runtime dependenciessrc/schema.ts file@mastra/convex/server to re-export schema definitions from the new location for backward compatibilityMigration
Users should now import schema tables from @mastra/convex/schema instead of @mastra/convex/server in their convex/schema.ts files:
// Before
import { mastraThreadsTable, mastraMessagesTable } from '@mastra/convex/server';
// After
import { mastraThreadsTable, mastraMessagesTable } from '@mastra/convex/schema';
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use LanguageModelV3 models from AI SDK v6 beta providers like @ai-sdk/openai@^3.0.0-beta.
New features:
reasoningTokens, cachedInputTokens, and raw data preserved in a raw fieldBackward compatible: All existing V1 and V2 models continue to work unchanged.
Fix model-level and runtime header support for LLM calls (#11275)
This fixes a bug where custom headers configured on models (like anthropic-beta) were not being passed through to the underlying AI SDK calls. The fix properly handles headers from multiple sources with correct priority:
Header Priority (low to high):
Examples that now work:
// Model config headers
new Agent({
model: {
id: 'anthropic/claude-4-5-sonnet',
headers: { 'anthropic-beta': 'context-1m-2025-08-07' },
},
});
// Runtime headers override config
agent.generate('...', {
modelSettings: { headers: { 'x-custom': 'runtime-value' } },
});
// Provider-level headers preserved
const openai = createOpenAI({ headers: { 'openai-organization': 'org-123' } });
new Agent({ model: openai('gpt-4o-mini') });
Fixed AbortSignal not propagating from parent workflows to nested sub-workflows in the evented workflow engine. (#11142)
Previously, canceling a parent workflow did not stop nested sub-workflows, causing them to continue running and consuming resources after the parent was canceled.
Now, when you cancel a parent workflow, all nested sub-workflows are automatically canceled as well, ensuring clean termination of the entire workflow tree.
Example:
const parentWorkflow = createWorkflow({ id: 'parent-workflow' }).then(someStep).then(nestedChildWorkflow).commit();
const run = await parentWorkflow.createRun();
const resultPromise = run.start({ inputData: { value: 5 } });
// Cancel the parent workflow - nested workflows will also be canceled
await run.cancel();
// or use: run.abortController.abort();
const result = await resultPromise;
// result.status === 'canceled'
// All nested child workflows are also canceled
Related to #11063
Fix empty overrideScorers causing error instead of skipping scoring (#11257)
When overrideScorers was passed as an empty object {}, the agent would throw a "No scorers found" error. Now an empty object explicitly skips scoring, while undefined continues to use default scorers.
feat: Add field filtering and nested workflow control to workflow execution result endpoint (#11246)
Adds two optional query parameters to /api/workflows/:workflowId/runs/:runId/execution-result endpoint:
fields: Request only specific fields (e.g., status, result, error)withNestedWorkflows: Control whether to fetch nested workflow dataThis significantly reduces response payload size and improves response times for large workflows.
# Get only status (minimal payload - fastest)
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status
# Get status and result
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,result
# Get all fields but without nested workflow data (faster)
GET /api/workflows/:workflowId/runs/:runId/execution-result?withNestedWorkflows=false
# Get only specific fields without nested workflow data
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,steps&withNestedWorkflows=false
# Get full data (default behavior)
GET /api/workflows/:workflowId/runs/:runId/execution-result
import { MastraClient } from '@mastra/client-js';
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
const workflow = client.getWorkflow('myWorkflow');
// Get only status (minimal payload - fastest)
const statusOnly = await workflow.runExecutionResult(runId, {
fields: ['status'],
});
console.log(statusOnly.status); // 'success' | 'failed' | 'running' | etc.
// Get status and result
const statusAndResult = await workflow.runExecutionResult(runId, {
fields: ['status', 'result'],
});
// Get all fields but without nested workflow data (faster)
const resultWithoutNested = await workflow.runExecutionResult(runId, {
withNestedWorkflows: false,
});
// Get specific fields without nested workflow data
const optimized = await workflow.runExecutionResult(runId, {
fields: ['status', 'steps'],
withNestedWorkflows: false,
});
// Get full execution result (default behavior)
const fullResult = await workflow.runExecutionResult(runId);
The Workflow.getWorkflowRunExecutionResult method now accepts an options object:
await workflow.getWorkflowRunExecutionResult(runId, {
withNestedWorkflows: false, // default: true, set to false to skip nested workflow data
fields: ['status', 'result'], // optional field filtering
});
The @mastra/inngest package has been updated to use the new options object API. This is a non-breaking internal change - no action required from inngest workflow users.
For workflows with large step outputs:
status: ~99% reduction in payload sizestatus,result,error: ~95% reduction in payload sizewithNestedWorkflows=false: Avoids expensive nested workflow data fetchingRemoved a debug log that printed large Zod schemas, resulting in cleaner console output when using agents with memory enabled. (#11279)
Set externals: true as the default for mastra build and cloud-deployer to reduce bundle issues with native dependencies. (0dbf199)
Note: If you previously relied on the default bundling behavior (all dependencies bundled), you can explicitly set externals: false in your bundler configuration.
Fix delayed promises rejecting when stream suspends on tool-call-approval (#11278)
When a stream ends in suspended state (e.g., requiring tool approval), the delayed promises like toolResults, toolCalls, text, etc. now resolve with partial results instead of rejecting with an error. This allows consumers to access data that was produced before the suspension.
Also improves generic type inference for LLMStepResult and related types throughout the streaming infrastructure.
Set externals: true as the default for mastra build and cloud-deployer to reduce bundle issues with native dependencies. (0dbf199)
Note: If you previously relied on the default bundling behavior (all dependencies bundled), you can explicitly set externals: false in your bundler configuration.
Set externals: true as the default for mastra build and cloud-deployer to reduce bundle issues with native dependencies. (0dbf199)
Note: If you previously relied on the default bundling behavior (all dependencies bundled), you can explicitly set externals: false in your bundler configuration.
Set externals: true as the default for mastra build and cloud-deployer to reduce bundle issues with native dependencies. (0dbf199)
Note: If you previously relied on the default bundling behavior (all dependencies bundled), you can explicitly set externals: false in your bundler configuration.
feat: Add field filtering and nested workflow control to workflow execution result endpoint (#11246)
Adds two optional query parameters to /api/workflows/:workflowId/runs/:runId/execution-result endpoint:
fields: Request only specific fields (e.g., status, result, error)withNestedWorkflows: Control whether to fetch nested workflow dataThis significantly reduces response payload size and improves response times for large workflows.
# Get only status (minimal payload - fastest)
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status
# Get status and result
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,result
# Get all fields but without nested workflow data (faster)
GET /api/workflows/:workflowId/runs/:runId/execution-result?withNestedWorkflows=false
# Get only specific fields without nested workflow data
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,steps&withNestedWorkflows=false
# Get full data (default behavior)
GET /api/workflows/:workflowId/runs/:runId/execution-result
import { MastraClient } from '@mastra/client-js';
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
const workflow = client.getWorkflow('myWorkflow');
// Get only status (minimal payload - fastest)
const statusOnly = await workflow.runExecutionResult(runId, {
fields: ['status'],
});
console.log(statusOnly.status); // 'success' | 'failed' | 'running' | etc.
// Get status and result
const statusAndResult = await workflow.runExecutionResult(runId, {
fields: ['status', 'result'],
});
// Get all fields but without nested workflow data (faster)
const resultWithoutNested = await workflow.runExecutionResult(runId, {
withNestedWorkflows: false,
});
// Get specific fields without nested workflow data
const optimized = await workflow.runExecutionResult(runId, {
fields: ['status', 'steps'],
withNestedWorkflows: false,
});
// Get full execution result (default behavior)
const fullResult = await workflow.runExecutionResult(runId);
The Workflow.getWorkflowRunExecutionResult method now accepts an options object:
await workflow.getWorkflowRunExecutionResult(runId, {
withNestedWorkflows: false, // default: true, set to false to skip nested workflow data
fields: ['status', 'result'], // optional field filtering
});
The @mastra/inngest package has been updated to use the new options object API. This is a non-breaking internal change - no action required from inngest workflow users.
For workflows with large step outputs:
status: ~99% reduction in payload sizestatus,result,error: ~95% reduction in payload sizewithNestedWorkflows=false: Avoids expensive nested workflow data fetchingFixed ReDoS vulnerability in working memory tag parsing. (#11248)
Replaced regex-based parsing with indexOf-based string parsing to prevent denial of service attacks from malicious input. The vulnerable regex /<working_memory>([^]*?)<\/working_memory>/g had O(n²) complexity on pathological inputs - the new implementation maintains O(n) linear time.
Change searchbar to search on input with debounce instead of on Enter key press (#11138)
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use LanguageModelV3 models from AI SDK v6 beta providers like @ai-sdk/openai@^3.0.0-beta.
New features:
reasoningTokens, cachedInputTokens, and raw data preserved in a raw fieldBackward compatible: All existing V1 and V2 models continue to work unchanged.
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use LanguageModelV3 models from AI SDK v6 beta providers like @ai-sdk/openai@^3.0.0-beta.
New features:
reasoningTokens, cachedInputTokens, and raw data preserved in a raw fieldBackward compatible: All existing V1 and V2 models continue to work unchanged.
Add execution metadata to A2A message/send responses. The A2A protocol now returns detailed execution information including tool calls, tool results, token usage, and finish reason in the task metadata. This allows clients to inspect which tools were invoked during agent execution and access execution statistics without additional queries. (#11241)
feat: Add field filtering and nested workflow control to workflow execution result endpoint (#11246)
Adds two optional query parameters to /api/workflows/:workflowId/runs/:runId/execution-result endpoint:
fields: Request only specific fields (e.g., status, result, error)withNestedWorkflows: Control whether to fetch nested workflow dataThis significantly reduces response payload size and improves response times for large workflows.
# Get only status (minimal payload - fastest)
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status
# Get status and result
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,result
# Get all fields but without nested workflow data (faster)
GET /api/workflows/:workflowId/runs/:runId/execution-result?withNestedWorkflows=false
# Get only specific fields without nested workflow data
GET /api/workflows/:workflowId/runs/:runId/execution-result?fields=status,steps&withNestedWorkflows=false
# Get full data (default behavior)
GET /api/workflows/:workflowId/runs/:runId/execution-result
import { MastraClient } from '@mastra/client-js';
const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
const workflow = client.getWorkflow('myWorkflow');
// Get only status (minimal payload - fastest)
const statusOnly = await workflow.runExecutionResult(runId, {
fields: ['status'],
});
console.log(statusOnly.status); // 'success' | 'failed' | 'running' | etc.
// Get status and result
const statusAndResult = await workflow.runExecutionResult(runId, {
fields: ['status', 'result'],
});
// Get all fields but without nested workflow data (faster)
const resultWithoutNested = await workflow.runExecutionResult(runId, {
withNestedWorkflows: false,
});
// Get specific fields without nested workflow data
const optimized = await workflow.runExecutionResult(runId, {
fields: ['status', 'steps'],
withNestedWorkflows: false,
});
// Get full execution result (default behavior)
const fullResult = await workflow.runExecutionResult(runId);
The Workflow.getWorkflowRunExecutionResult method now accepts an options object:
await workflow.getWorkflowRunExecutionResult(runId, {
withNestedWorkflows: false, // default: true, set to false to skip nested workflow data
fields: ['status', 'result'], // optional field filtering
});
The @mastra/inngest package has been updated to use the new options object API. This is a non-breaking internal change - no action required from inngest workflow users.
For workflows with large step outputs:
status: ~99% reduction in payload sizestatus,result,error: ~95% reduction in payload sizewithNestedWorkflows=false: Avoids expensive nested workflow data fetchingSet externals: true as the default for mastra build and cloud-deployer to reduce bundle issues with native dependencies. (0dbf199)
Note: If you previously relied on the default bundling behavior (all dependencies bundled), you can explicitly set externals: false in your bundler configuration.
Two smaller quality of life improvements: (#11232)
create-mastra project no longer defines a LibSQLStore storage for the weather agent memory. It uses the root level storage option now (which is memory). This way no mastra.db files are created outside of the projectmastra init inside a project that already has git initialized, the prompt to initialize git is skippedFull Changelog: f6c82ec
Fetched April 7, 2026