December 18, 2025
Changelog
@mastra/agent-builder@1.0.0-beta.6
Patch Changes
-
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use
LanguageModelV3models from AI SDK v6 beta providers like@ai-sdk/openai@^3.0.0-beta.New features:
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
reasoningTokens,cachedInputTokens, and raw data preserved in arawfield
Backward compatible: All existing V1 and V2 models continue to work unchanged.
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
@mastra/ai-sdk@1.0.0-beta.10
Patch Changes
-
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use
LanguageModelV3models from AI SDK v6 beta providers like@ai-sdk/openai@^3.0.0-beta.New features:
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
reasoningTokens,cachedInputTokens, and raw data preserved in arawfield
Backward compatible: All existing V1 and V2 models continue to work unchanged.
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
-
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:
- Context from middleware (highest priority)
- Context from defaultOptions
- Context from request body (lowest priority)
Resolves #11192
@mastra/auth-auth0@1.0.0-beta.3
Major Changes
-
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 throwing- Empty or invalid tokens are now rejected early
authorizeUser()now performs meaningful security checks
These changes improve stability, prevent runtime crashes, and enforce safer authentication & authorization behavior throughout the system.
@mastra/client-js@1.0.0-beta.14
Patch Changes
-
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-resultendpoint:fields: Request only specific fields (e.g.,status,result,error)withNestedWorkflows: Control whether to fetch nested workflow data
This significantly reduces response payload size and improves response times for large workflows.
Server Endpoint Usage
# 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-resultClient SDK Usage
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);Core API Changes
The
Workflow.getWorkflowRunExecutionResultmethod 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 });
@mastra/convex@0.1.0-beta.5
Minor Changes
-
Fixed Convex schema exports to support import in
convex/schema.tsfiles. (#11242)Previously, importing table definitions from
@mastra/convex/serverfailed 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
- Added new export path
@mastra/convex/schemathat provides table definitions without runtime dependencies - Moved schema definitions to a separate
src/schema.tsfile - Updated
@mastra/convex/serverto re-export schema definitions from the new location for backward compatibility
Migration
Users should now import schema tables from
@mastra/convex/schemainstead of@mastra/convex/serverin theirconvex/schema.tsfiles:// Before import { mastraThreadsTable, mastraMessagesTable } from '@mastra/convex/server'; // After import { mastraThreadsTable, mastraMessagesTable } from '@mastra/convex/schema'; - Added new export path
@mastra/core@1.0.0-beta.14
Minor Changes
-
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use
LanguageModelV3models from AI SDK v6 beta providers like@ai-sdk/openai@^3.0.0-beta.New features:
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
reasoningTokens,cachedInputTokens, and raw data preserved in arawfield
Backward compatible: All existing V1 and V2 models continue to work unchanged.
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
Patch Changes
-
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):
- Model config headers - Headers set in model configuration
- ModelSettings headers - Runtime headers that override model config
- Provider-level headers - Headers baked into AI SDK providers (not overridden)
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 canceledRelated to #11063
-
Fix empty overrideScorers causing error instead of skipping scoring ()
@mastra/deployer@1.0.0-beta.14
Minor Changes
-
Set
externals: trueas the default formastra buildand 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: falsein your bundler configuration.
@mastra/deployer-cloud@1.0.0-beta.14
Minor Changes
-
Set
externals: trueas the default formastra buildand 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: falsein your bundler configuration.
@mastra/deployer-cloudflare@1.0.0-beta.1
Minor Changes
-
Set
externals: trueas the default formastra buildand 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: falsein your bundler configuration.
@mastra/inngest@1.0.0-beta.9
Patch Changes
-
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-resultendpoint:fields: Request only specific fields (e.g.,status,result,error)withNestedWorkflows: Control whether to fetch nested workflow data
This significantly reduces response payload size and improves response times for large workflows.
Server Endpoint Usage
# 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-resultClient SDK Usage
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);Core API Changes
The
Workflow.getWorkflowRunExecutionResultmethod 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 });
@mastra/mcp-docs-server@1.0.0-beta.14
Patch Changes
- Add --log-level CLI argument to control log verbosity (#11256)
@mastra/memory@1.0.0-beta.6
Patch Changes
-
Fixed 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>/ghad O(n²) complexity on pathological inputs - the new implementation maintains O(n) linear time.
@mastra/observability@1.0.0-beta.6
Patch Changes
- Limits the size of large payloads in span data. (#11237)
@mastra/playground-ui@7.0.0-beta.14
Patch Changes
-
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
LanguageModelV3models from AI SDK v6 beta providers like@ai-sdk/openai@^3.0.0-beta.New features:
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
reasoningTokens,cachedInputTokens, and raw data preserved in arawfield
Backward compatible: All existing V1 and V2 models continue to work unchanged.
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
@mastra/rag@2.0.0-beta.4
Patch Changes
-
Add support for AI SDK v6 (LanguageModelV3) (#11191)
Agents can now use
LanguageModelV3models from AI SDK v6 beta providers like@ai-sdk/openai@^3.0.0-beta.New features:
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
reasoningTokens,cachedInputTokens, and raw data preserved in arawfield
Backward compatible: All existing V1 and V2 models continue to work unchanged.
- Usage normalization: V3's nested usage format is normalized to Mastra's flat format with
@mastra/server@1.0.0-beta.14
Patch Changes
-
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-resultendpoint:fields: Request only specific fields (e.g.,status,result,error)withNestedWorkflows: Control whether to fetch nested workflow data
This significantly reduces response payload size and improves response times for large workflows.
Server Endpoint Usage
# 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-resultClient SDK Usage
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);
mastra@1.0.0-beta.11
Patch Changes
-
Set
externals: trueas the default formastra buildand 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: falsein your bundler configuration. -
Two smaller quality of life improvements: (#11232)
- The default
create-mastraproject no longer defines a LibSQLStore storage for the weather agent memory. It uses the root levelstorageoption now (which is memory). This way nomastra.dbfiles are created outside of the project - When running
mastra initinside a project that already has git initialized, the prompt to initialize git is skipped
- The default
Full Changelog: f6c82ec