Back to Mastra

OVHcloud AI Endpoints | Models

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

2025-12-185.6 KB
Original Source

OVHcloud AI Endpoints

Access 13 OVHcloud AI Endpoints models through Mastra's model router. Authentication is handled automatically using the OVHCLOUD_API_KEY environment variable.

Learn more in the OVHcloud AI Endpoints documentation.

bash
OVHCLOUD_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: "ovhcloud/deepseek-r1-distill-llama-70b"
});

// 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 OVHcloud AI Endpoints documentation for details.

:::

Models

<ProviderModelsTable models={[ { "model": "ovhcloud/deepseek-r1-distill-llama-70b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 0.74, "outputCost": 0.74 }, { "model": "ovhcloud/gpt-oss-120b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 0.09, "outputCost": 0.47 }, { "model": "ovhcloud/gpt-oss-20b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 0.05, "outputCost": 0.18 }, { "model": "ovhcloud/llama-3.1-8b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 0.11, "outputCost": 0.11 }, { "model": "ovhcloud/meta-llama-3_3-70b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 0.74, "outputCost": 0.74 }, { "model": "ovhcloud/mistral-7b-instruct-v0.3", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 65536, "maxOutput": 65536, "inputCost": 0.11, "outputCost": 0.11 }, { "model": "ovhcloud/mistral-nemo-instruct-2407", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 65536, "maxOutput": 65536, "inputCost": 0.14, "outputCost": 0.14 }, { "model": "ovhcloud/mistral-small-3.2-24b-instruct-2506", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 131072, "maxOutput": 131072, "inputCost": 0.1, "outputCost": 0.31 }, { "model": "ovhcloud/mixtral-8x7b-instruct-v0.1", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": false, "contextWindow": 32768, "maxOutput": 32768, "inputCost": 0.7, "outputCost": 0.7 }, { "model": "ovhcloud/qwen2.5-coder-32b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": false, "contextWindow": 32768, "maxOutput": 32768, "inputCost": 0.96, "outputCost": 0.96 }, { "model": "ovhcloud/qwen2.5-vl-72b-instruct", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": false, "contextWindow": 32768, "maxOutput": 32768, "inputCost": 1.01, "outputCost": 1.01 }, { "model": "ovhcloud/qwen3-32b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 32768, "maxOutput": 32768, "inputCost": 0.09, "outputCost": 0.25 }, { "model": "ovhcloud/qwen3-coder-30b-a3b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 262144, "maxOutput": 262144, "inputCost": 0.07, "outputCost": 0.26 } ]} />

Advanced configuration

Custom headers

typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1",
    id: "ovhcloud/deepseek-r1-distill-llama-70b",
    apiKey: process.env.OVHCLOUD_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
      ? "ovhcloud/qwen3-coder-30b-a3b-instruct"
      : "ovhcloud/deepseek-r1-distill-llama-70b";
  }
});