Back to Mastra

Meganova | Models

docs/src/content/en/models/providers/meganova.mdx

2025-12-187.1 KB
Original Source

Meganova

Access 19 Meganova models through Mastra's model router. Authentication is handled automatically using the MEGANOVA_API_KEY environment variable.

Learn more in the Meganova documentation.

bash
MEGANOVA_API_KEY=your-api-key
typescript
import { Agent } from "@mastra/core/agent";

const agent = new Agent({
  id: "my-agent",
  name: "My Agent",
  instructions: "You are a helpful assistant",
  model: "meganova/MiniMaxAI/MiniMax-M2.1"
});

// Generate a response
const response = await agent.generate("Hello!");

// Stream a response
const stream = await agent.stream("Tell me a story");
for await (const chunk of stream) {
  console.log(chunk);
}

:::info

Mastra uses the OpenAI-compatible /chat/completions endpoint. Some provider-specific features may not be available. Check the Meganova documentation for details.

:::

Models

<ProviderModelsTable models={[ { "model": "meganova/deepseek-ai/DeepSeek-R1-0528", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": true, "contextWindow": 163840, "maxOutput": 64000, "inputCost": 0.5, "outputCost": 2.15 }, { "model": "meganova/deepseek-ai/DeepSeek-V3-0324", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 163840, "maxOutput": 163840, "inputCost": 0.25, "outputCost": 0.88 }, { "model": "meganova/deepseek-ai/DeepSeek-V3.1", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 164000, "maxOutput": 164000, "inputCost": 0.27, "outputCost": 1 }, { "model": "meganova/deepseek-ai/DeepSeek-V3.2", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 164000, "maxOutput": 164000, "inputCost": 0.26, "outputCost": 0.38 }, { "model": "meganova/deepseek-ai/DeepSeek-V3.2-Exp", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 164000, "maxOutput": 164000, "inputCost": 0.27, "outputCost": 0.4 }, { "model": "meganova/meta-llama/Llama-3.3-70B-Instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 16384, "inputCost": 0.1, "outputCost": 0.3 }, { "model": "meganova/MiniMaxAI/MiniMax-M2.1", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 196608, "maxOutput": 131072, "inputCost": 0.28, "outputCost": 1.2 }, { "model": "meganova/MiniMaxAI/MiniMax-M2.5", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 204800, "maxOutput": 131072, "inputCost": 0.3, "outputCost": 1.2 }, { "model": "meganova/mistralai/Mistral-Nemo-Instruct-2407", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 65536, "inputCost": 0.02, "outputCost": 0.04 }, { "model": "meganova/mistralai/Mistral-Small-3.2-24B-Instruct-2506", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 32768, "maxOutput": 8192, "inputCost": null, "outputCost": null }, { "model": "meganova/moonshotai/Kimi-K2-Thinking", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 262144, "maxOutput": 262144, "inputCost": 0.6, "outputCost": 2.6 }, { "model": "meganova/moonshotai/Kimi-K2.5", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 262144, "maxOutput": 262144, "inputCost": 0.45, "outputCost": 2.8 }, { "model": "meganova/Qwen/Qwen2.5-VL-32B-Instruct", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 16384, "maxOutput": 16384, "inputCost": 0.2, "outputCost": 0.6 }, { "model": "meganova/Qwen/Qwen3-235B-A22B-Instruct-2507", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 262000, "maxOutput": 262000, "inputCost": 0.09, "outputCost": 0.6 }, { "model": "meganova/Qwen/Qwen3.5-Plus", "imageInput": true, "audioInput": false, "videoInput": true, "toolUsage": true, "reasoning": true, "contextWindow": 1000000, "maxOutput": 65536, "inputCost": 0.4, "outputCost": 2.4 }, { "model": "meganova/XiaomiMiMo/MiMo-V2-Flash", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 262144, "maxOutput": 32000, "inputCost": 0.1, "outputCost": 0.3 }, { "model": "meganova/zai-org/GLM-4.6", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 202752, "maxOutput": 131072, "inputCost": 0.45, "outputCost": 1.9 }, { "model": "meganova/zai-org/GLM-4.7", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 202752, "maxOutput": 131072, "inputCost": 0.2, "outputCost": 0.8 }, { "model": "meganova/zai-org/GLM-5", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 202752, "maxOutput": 131072, "inputCost": 0.8, "outputCost": 2.56 } ]} />

Advanced configuration

Custom headers

typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://api.meganova.ai/v1",
    id: "meganova/MiniMaxAI/MiniMax-M2.1",
    apiKey: process.env.MEGANOVA_API_KEY,
    headers: {
      "X-Custom-Header": "value"
    }
  }
});

Dynamic model selection

typescript
const agent = new Agent({
  id: "dynamic-agent",
  name: "Dynamic Agent",
  model: ({ requestContext }) => {
    const useAdvanced = requestContext.task === "complex";
    return useAdvanced
      ? "meganova/zai-org/GLM-5"
      : "meganova/MiniMaxAI/MiniMax-M2.1";
  }
});