2025-08-05 - Mastra Release
Agents
-
The default Google Gemini model from the deprecated experimental 'gemini-2.5-pro-exp-03-25' to the stable 'gemini-2.5-pro' model to fix onboarding issues caused by the removed model. #6443
-
The getVoice and getScorers functions from agent trace logging. #6590
-
A unified types builder utility to ensure all generated TypeScript declaration files use proper .js import extensions for ESM compatibility, updates build and tsup configurations across the monorepo, and resolves type generation issues. #6588 [TIER2]
-
The convert message list v1 function to include message deduplication and adds corresponding tests. #6597
Core Platform Components
-
Update safelyParseJSON to better handle parameter values, fixing an issue where certain database rows were not properly retrieved from the vector DB, which caused traces to fail to load for stores like PostgreSQL. #6576
-
Mastra core peer dependencies to accommodate breaking changes in the scorer API and score data storage. #6578
Deployer
- That when scaffolding mastra, version 4 is explicitly installed instead of the newly released version 5. #6452
Developer Tools & UI
- Fixed Lodash CommonJS import issues by adding the @optimize-lodash/rollup-plugin, allowing users to utilize lodash dependencies without manual installation. #6410
- Added tests to the AGUIAdapter to verify correct message handling and parameter passing, clarifying its expected behavior and aiding investigation of a related issue. #6397
- Lodash imports in the Rollup bundler, updates test templates to validate lodash usage, and corrects agent and configuration object syntax, ensuring efficient bundling and proper functionality. #6476
- A 'transpilePackages' option to Mastra's bundler configuration, enabling custom transpilation of TypeScript packages within the monorepo. #6142
- Added a preview button to the working memory section of the playground, allowing users to open a modal and preview rendered markdown of their current content or changes. #6437
Evals
- Updates the ai-sdk package versions for the evals and rag packages to use pre-sdk-v5 versions instead the latest. #6505
- Breaking changes to the Scorer API by renaming step methods, switching to a method chaining initialization pattern, removing createLLMScorer, and updating related stores, evals, and playground components. #6455 [IMPORTANT]
Examples
-
Setup a template for converting PDFs to podcasts. #6101 [TIER2]
-
Updates the examples for Agents and Tools. #6508
-
The workflow example to use the current Mastra API, refactors logic for better step usage, and ensures compatibility and type safety for both even and odd input scenarios. #6583
-
Updates the documentation by adding an image example to the agents overview section. #6442
MCP
- A context binding bug in the MessageList ID generator and updates related tests to better cover user workflows. #6483
- Support for OAuth authentication with automatic token refresh to HTTP-based MCP servers by exposing an authProvider option, updating relevant transports, adding tests, and updating documentation. #6370
Memory
- A bug where memory instances were not properly registered with Mastra when added to an agent, ensuring correct use of the custom ID generator and increasing test coverage. #6420
- An issue with AWS Bedrock agent memory by ensuring conversations start with a user message and comments out now-unnecessary logic for removing tool call messages. #6327
- The Client SDK - JS removes a custom header from mastraClient, fixes JSON issues in the client-js workflow, and updates the AI SDK dependency to version 4.2.2. #6408
- Enriches documentation by adding videos related to memory. #6502
- Metadata filtering in the LibSQL vector store for the Memory system by correcting JSON path syntax, adjusting the default minScore to include all cosine similarity results, and adding tests to ensure proper filtering across vector stores. #6603
Networks
- Fixed a bug where splitting v2 messages into multiple v1 messages caused ID collisions and loss of tool call history by ensuring each split message receives a unique ID, preserving conversation context and tool history. #6608 [IMPORTANT]
Observability
- The PinoLogger documentation and API reference in Mastra Cloud. #6395
- Fix the tracing of runtimeContext values to resolve issue #6517. #6589
Prod analytics
- The initial framework for the new AI Telemetry system as a non-breaking new feature. #6380 [TIER2]
RAG
- The Renovate tool, removes the unused tiktoken dependency, and increases the timeout in a RAG test. #6412
- A new sentence chunking strategy with advanced boundary detection, overhauls the chunking API and type system for improved safety and usability, and enforces stricter parameter validation, resulting in breaking changes to chunking options and transformer instantiation. #6398
Storage
- Schema support for PostgreSQL by ensuring that workflow snapshots and scores correctly include the schema name in table operations, updates related classes and tests, and ensures unique constraints across schemas. #6405
- A test to ensure that using an empty filter in MongoDB does not produce an error, addressing issue #6367. #6462
- A bug in the Postgres Store to ensure a score ID is generated when saving scores, preventing insert failures due to missing IDs. #6352
- A comprehensive scoring system with full CRUD operations, enhances MSSQL storage operations including message deletion, thread management, batch trace insertion, improved schema and timestamp handling, and updates core dependencies. #6501
- A bug where retrieving a trace from the playground would incorrectly parse the object and return an empty object. #6449
- The JavaScript Client SDK removes a custom header, fixes JSON issues in the workflow, and updates the AI SDK dependency. #6493
- The dynamic require of the 'crypto' module in the Upstash store to resolve issue #5028. #6479
- MongoDB vector filtering by correctly mapping thread_id and resource_id filters to the metadata subdocument, ensuring accurate semantic recall, and adds shared test utilities to prevent similar issues. #6596
- The PostgreSQL vector store to set the default minScore to -1 (to include orthogonal vectors with cosine similarity 0), and adds tests to ensure correct metadata filtering for the Memory system. #6605
Tools
- An issue where tool call history was lost during V1 message conversion by ensuring tool invocations are preserved and properly processed, filtering out working memory tool calls, and adding comprehensive tests to verify correct behavior. #6387
- The preservation of tool invocation history by ensuring assistant messages with mixed content are properly separated into distinct text and tool call messages, enabling accurate referencing of previous tool call results. #6461
- An issue where assistant tool call messages were missing corresponding tool result messages, which caused the chatbot to break when handling follow-up questions. #6500
Website
- Redirects to ensure that links containing a locale (e.g., /en/) work correctly when accessed directly. #6591
Workflows
- The step parameter optional in run.resume(), enabling automatic detection and resumption of suspended workflow steps for a more user-friendly and backwards-compatible workflow API. #6396
- An issue with AbortController usage in Cloudflare Workers by lazily initializing Run's AbortController, enabling Mastra projects to deploy without errors on that platform. #6470
- A critical bug in parallel workflow execution by ensuring that a parallel block only completes when all parallel steps have been successfully resumed and executed, preventing silent failures and data integrity issues when only some parallel steps are resumed. #6423
- An issue where branching workflow steps incorrectly remained in a 'suspended' state after being successfully resumed, ensuring step statuses now accurately update to 'success' and workflow state remains consistent. #6424