Mastra published @mastra/core@1.70.0 on 2026-09-24 with ModelSelectionProcessor for classifier-backed per-request model routing (#24865), closeOnSuspend on durable agent streams so AG-UI-style loops can finish on tool suspend, plus createClassifierScorer(), optional tool titles, and trace aggregate dimension/measure helpers with tag predicates. Docs warn routing is not always cheaper because models do not share prompt caches.
Key Takeaways
- ✓
ModelSelectionProcessorroutes simple vs hard requests (#24865);scope: 'first-step'optional - ✓Durable
closeOnSuspend: trueends streams at tool suspend (#24894) - ✓
createClassifierScorer()maps Classifier questions to 0–1 scores (#24792) - ✓Trace aggregate descriptors + tag predicates for advanced queries
- ✓Upgrade:
npm i @mastra/core@1.70.0; see CHANGELOG + processors docs
Key Decision Metrics at a Glance
Turn your technical choice into a development budget
Compare 40 dev plans & simulate token costs vs $20/mo subscriptions
Project Links & Resources
Direct AccessIn-Depth Technical Analysis
Background
One-size-fits-all frontier models waste spend on trivial turns. Mastra 1.70.0 packages classifier-backed model routing as ModelSelectionProcessor and fixes durable stream hang-on-suspend for UI integrations.
Architecture
ModelSelectionProcessor builds or reuses a Classifier to pick per-request models; failures fall back to the agent default/fallbacks. closeOnSuspend: true closes durable streams at tool suspend. Also: tool display title, createClassifierScorer(), trace aggregate helpers, tag predicates, and stricter client-echo history filtering (retainFullInput opt-out).
Benchmarks
No public cost/quality board—Mastra warns prompt caches are not shared across models; measure on your traffic. Verify via PRs #24865 and #24894 plus the 1.70.0 CHANGELOG.
Get started
npm i @mastra/core@1.70.0; read the core CHANGELOG and https://mastra.ai/docs/agents/processors.
Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.
Discussion & Comments
0Sign in to join the discussion
Connect with AI developers to exchange benchmark insights.