Highlights
Generate Endpoint Fix for OpenAI Streaming
We've switched to using proper generate endpoints for model calls, fixing a critical permission issue with OpenAI streaming. No more 403 errors when your users don't have full model permissions - the generate endpoint respects granular API key scopes properly.
AI SDK v5: Fine-Grained Stream Control
Building custom UIs? You now have complete control over what gets sent in your AI SDK streams. Configure exactly which message chunks your frontend receives with the new sendStart, sendFinish, sendReasoning, and sendSources options.
Changelog
@mastra/ai-sdk
-
Add sendStart, sendFinish, sendReasoning, and sendSources options to toAISdkV5Stream function, allowing fine-grained control over which message chunks are included in the converted stream. Previously, these values were hardcoded in the transformer.
BREAKING CHANGE: AgentStreamToAISDKTransformer now accepts an options object instead of a single lastMessageId parameter
Also, add sendStart, sendFinish, sendReasoning, and sendSources parameters to
chatRoute function, enabling fine-grained control over which chunks are
included in the AI SDK stream output. (#10127) -
Added support for tripwire data chunks in streaming responses.
Tripwire chunks allow the AI SDK to emit special data events when certain conditions are triggered during stream processing. These chunks include a
tripwireReasonfield explaining why the tripwire was activated.Usage
When converting Mastra chunks to AI SDK v5 format, tripwire chunks are now automatically handled:
// Tripwire chunks are converted to data-tripwire format
const chunk = {
type: 'tripwire',
payload: { tripwireReason: 'Rate limit approaching' }
};
// Converts to:
{
type: 'data-tripwire',
data: { tripwireReason: 'Rate limit approaching' }
}(#10269)
@mastra/auth
- Allow provider to pass through options to the auth config (#10284)
@mastra/auth-auth0
- Allow provider to pass through options to the auth config (#10284)
@mastra/auth-clerk
- Allow provider to pass through options to the auth config (#10284)
@mastra/auth-firebase
- Allow provider to pass through options to the auth config (#10284)
@mastra/auth-supabase
- Allow provider to pass through options to the auth config (#10284)
@mastra/auth-workos
- Allow provider to pass through options to the auth config (#10284)
@mastra/client-js
- Added optional
descriptionfield toGetAgentResponseto support richer agent metadata (#10305)
@mastra/core
-
Only handle download image asset transformation if needed (#10122)
-
Fix tool outputSchema validation to allow unsupported Zod types like ZodTuple. The outputSchema is only used for internal validation and never sent to the LLM, so model compatibility checks are not needed. (#9409)
-
Fix vector definition to fix pinecone (#10150)
-
Add type bailed to workflowRunStatus (#10091)
-
Allow provider to pass through options to the auth config (#10284)
-
Fix deprecation warning when agent network executes workflows by using
.fullStreaminstead of iteratingWorkflowRunOutputdirectly (#10306) -
Add support for doGenerate in LanguageModelV2. This change fixes issues with OpenAI stream permissions.
- Added new abstraction over LanguageModelV2 (#10239)
@mastra/mcp
- Add timeout configuration to mcp server config (#9891)
@mastra/mcp-docs-server
- Add migration tool to mcp docs server for stable branch that will let users know to upgrade mcp docs server @latest to @beta to get the proper migration tool. (#10200)
@mastra/server
- Network handler now accesses thread and resource parameters from the nested memory object instead of directly from request body. (#10294)
@mastra/observability
- Updates console warning when cloud access token env is not set. (#9149)
@mastra/pinecone
- Adjust pinecone settings (#10182)
@mastra/playground-ui
- Fix scorer filtering for SpanScoring, add error and info message for user (#10160)
@mastra/voice-google-gemini-live
- gemini live fix (#10234)
- fix(voice): Fix Vertex AI WebSocket connection failures in GeminiLiveVoice (#10243)
create-mastra
- fix: detect bun runtime and cleanup on failure (#10307)