Mastra
The earlier example used an OpenRouter-specific adapter without directing it to TheRouter. Do not send a TheRouter API key to an unverified endpoint.
A complete Mastra integration with TheRouter has not yet been verified. If your framework version supports a custom OpenAI-compatible provider, configure the base URL as https://api.therouter.ai/v1, use a TheRouter key on the server, and test the selected model before production.
For an endpoint configuration checked against the OpenAI-compatible request format, see the Vercel AI SDK guide or the TypeScript client guide. Check the model catalog for current availability and pricing.