iCreatAI News
Skip to content
Mastra Blog·· 3 days agoAI score47

Introducing Private Model Gateways for Mastra Agents

Introducing Private Model Gateways for Mastra Agents

AI summary

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.

Source: Mastra Blog · mastra.ai