Mastra launches private model gateway, can route self-hosted models
Understand this story
Mastra launches a private model gateway, allowing agent requests to be routed to self-hosted open-weight models, referencing models in the agent configuration in a form such as `private/ollama/gpt-oss:20b`. This feature requires @mastra/[email protected] or higher and was added by PR #18153. If you only want users to select models from your own gateway and not show external providers in the Studio model selector, you can set AUTO_BLOCK_EXTERNAL_PROVIDERS=true in .env.
AI overview based on source reports · Updated 2 days ago
Coverage timeline
Follow the coverage to explore different perspectives.
- Mastra BlogIntroducing Private Model Gateways for Mastra Agents
Mastra now lets agents route requests to self-hosted open-weight models through a custom model gateway, configured with a custom ID and referenced as a model prefix such as private/ollama/gpt-oss:20b. The post walks through creating a gateway for a local Ollama server, registering it on the Mastra instance, and setting AUTO_BLOCK_EXTERNAL_PROVIDERS=true to hide external providers in Studio's model picker. It requires @mastra/[email protected] or later and cites privacy/compliance and fixed infrastructure costs as motivations.
Activity for this story
- Current comparable activity
- 3
- Peak comparable activity
- 6Nov 13 03:00
- Change in the past 24 hours
- -49%
Trends compare the same fully observed participants, which may cover fewer participants than current activity. Move the pointer or tap the chart to inspect hourly activity; use the left and right arrow keys with a keyboard.