-
Update provider registry and model documentation with latest models and providers
Fixes: e6fc281
-
Fixed processors returning { tools: {}, toolChoice: 'none' } being ignored. Previously, when a processor returned empty tools with an explicit toolChoice: 'none' to prevent tool calls, the toolChoice was discarded and defaulted to 'auto'. This fix preserves the explicit 'none' value, enabling patterns like ensuring a final text response when maxSteps is reached.
Fixes: #12601
-
Internal changes to enable observational memory
-
Internal changes to enable @mastra/editor
-
Fix moonshotai/kimi-k2.5 multi-step tool calling failing with "reasoning_content is missing in assistant tool call message"
-
Changed moonshotai and moonshotai-cn (China version) providers to use Anthropic-compatible API endpoints instead of OpenAI-compatible
-
Fixed custom input processors from disabling workspace skill tools in generate() and stream(). Custom processors now replace only the processors you configured, while memory and skills remain available. Fixes #12612.
Fixes: #12676
-
Fixed
Workspace search index names now use underscores so they work with SQL-based vector stores (PgVector, LibSQL).
Added
You can now set a custom index name with searchIndexName.
Why
Some SQL vector stores reject hyphens in index names.
Example
// Before - would fail with PgVector
new Workspace({ id: "my-workspace", vectorStore, embedder });
// After - works with all vector stores
new Workspace({ id: "my-workspace", vectorStore, embedder });
// Or use a custom index name
new Workspace({ vectorStore, embedder, searchIndexName: "my_workspace_vectors" });
Fixes: #12673
-
Added logger support to Workspace filesystem and sandbox providers. Providers extending MastraFilesystem or MastraSandbox now automatically receive the Mastra logger for consistent logging of file operations and command executions.
Fixes: #12606
-
Added ToolSearchProcessor for dynamic tool discovery.
Agents can now discover and load tools on demand instead of having all tools available upfront. This reduces context token usage by ~94% when working with large tool libraries.
New API:
import { ToolSearchProcessor } from "@mastra/core/processors";
import { Agent } from "@mastra/core";
// Create a processor with searchable tools
const toolSearch = new ToolSearchProcessor({
tools: {
createIssue: githubTools.createIssue,
sendEmail: emailTools.send
// ... hundreds of tools
},
search: {
topK: 5, // Return top 5 results (default: 5)
minScore: 0.1 // Filter results below this score (default: 0)
}
});
// Attach processor to agent
const agent = new Agent({
name: "my-agent",
inputProcessors: [toolSearch],
tools: {
/* always-available tools */
}
});
How it works:
The processor automatically provides two meta-tools to the agent:
search_tools - Search for available tools by keyword relevance
load_tool - Load a specific tool into the conversation
The agent discovers what it needs via search and loads tools on demand. Loaded tools are available immediately and persist within the conversation thread.
Why:
When agents have access to 100+ tools (from MCP servers or integrations), including all tool definitions in the context can consume significant tokens (~1,500 tokens per tool). This pattern reduces context usage by giving agents only the tools they need, when they need them.
Fixes: #12290
-
Catch up evented workflows on parity with default execution engine
Fixes: #12555
-
Expose token usage from embedding operations
-
saveMessages now returns usage: { tokens: number } with aggregated token count from all embeddings
-
recall now returns usage: { tokens: number } from the vector search query embedding
-
Updated abstract method signatures in MastraMemory to include optional usage in return types
This allows users to track embedding token usage when using the Memory class.
Fixes: #12556
-
Fixed a security issue where sensitive observability credentials (such as Langfuse API keys) could be exposed in tool execution error logs. The tracingContext is now properly excluded from logged data.
Fixes: #12669
-
Fixed issue where some models incorrectly call skill names directly as tools instead of using skill-activate. Added clearer system instructions that explicitly state skills are NOT tools and must be activated via skill-activate with the skill name as the "name" parameter. Fixes #12654.
Fixes: #12677
-
Improved workspace filesystem error handling: return 404 for not-found errors instead of 500, show user-friendly error messages in UI, and add MastraClientError class with status/body properties for better error handling
Fixes: #12533
-
Improved workspace tool descriptions with clearer usage guidance for read_file, edit_file, and execute_command tools.
Fixes: #12640
-
Fixed JSON parsing in agent network to handle malformed LLM output. Uses parsePartialJson from AI SDK to recover truncated JSON, missing braces, and unescaped control characters instead of failing immediately. This reduces unnecessary retry round-trips when the routing agent generates slightly malformed JSON for tool/workflow prompts. Fixes #12519.
Fixes: #12526