Back to Mastra

Scaleway | Models

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

2025-12-186.2 KB
Original Source

Scaleway

Access 16 Scaleway models through Mastra's model router. Authentication is handled automatically using the SCALEWAY_API_KEY environment variable.

Learn more in the Scaleway documentation.

bash
SCALEWAY_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: "scaleway/bge-multilingual-gemma2"
});

// 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 Scaleway documentation for details.

:::

Models

<ProviderModelsTable models={[ { "model": "scaleway/bge-multilingual-gemma2", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": false, "contextWindow": 8191, "maxOutput": 3072, "inputCost": 0.1, "outputCost": null }, { "model": "scaleway/deepseek-r1-distill-llama-70b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 32000, "maxOutput": 8196, "inputCost": 0.9, "outputCost": 0.9 }, { "model": "scaleway/devstral-2-123b-instruct-2512", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 256000, "maxOutput": 16384, "inputCost": 0.4, "outputCost": 2 }, { "model": "scaleway/gemma-3-27b-it", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": true, "contextWindow": 40000, "maxOutput": 8192, "inputCost": 0.25, "outputCost": 0.5 }, { "model": "scaleway/gpt-oss-120b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 32768, "inputCost": 0.15, "outputCost": 0.6 }, { "model": "scaleway/llama-3.1-8b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 16384, "inputCost": 0.2, "outputCost": 0.2 }, { "model": "scaleway/llama-3.3-70b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 100000, "maxOutput": 16384, "inputCost": 0.9, "outputCost": 0.9 }, { "model": "scaleway/mistral-nemo-instruct-2407", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 8192, "inputCost": 0.2, "outputCost": 0.2 }, { "model": "scaleway/mistral-small-3.2-24b-instruct-2506", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 32768, "inputCost": 0.15, "outputCost": 0.35 }, { "model": "scaleway/pixtral-12b-2409", "imageInput": true, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 4096, "inputCost": 0.2, "outputCost": 0.2 }, { "model": "scaleway/qwen3-235b-a22b-instruct-2507", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 260000, "maxOutput": 16384, "inputCost": 0.75, "outputCost": 2.25 }, { "model": "scaleway/qwen3-coder-30b-a3b-instruct", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 128000, "maxOutput": 32768, "inputCost": 0.2, "outputCost": 0.8 }, { "model": "scaleway/qwen3-embedding-8b", "imageInput": false, "audioInput": false, "videoInput": false, "toolUsage": false, "reasoning": false, "contextWindow": 32768, "maxOutput": 4096, "inputCost": 0.1, "outputCost": null }, { "model": "scaleway/qwen3.5-397b-a17b", "imageInput": true, "audioInput": false, "videoInput": true, "toolUsage": true, "reasoning": true, "contextWindow": 256000, "maxOutput": 16384, "inputCost": 0.6, "outputCost": 3.6 }, { "model": "scaleway/voxtral-small-24b-2507", "imageInput": false, "audioInput": true, "videoInput": false, "toolUsage": true, "reasoning": false, "contextWindow": 32000, "maxOutput": 16384, "inputCost": 0.15, "outputCost": 0.35 }, { "model": "scaleway/whisper-large-v3", "imageInput": false, "audioInput": true, "videoInput": false, "toolUsage": false, "reasoning": false, "contextWindow": null, "maxOutput": 8192, "inputCost": 0.003, "outputCost": null } ]} />

Advanced configuration

Custom headers

typescript
const agent = new Agent({
  id: "custom-agent",
  name: "custom-agent",
  model: {
    url: "https://api.scaleway.ai/v1",
    id: "scaleway/bge-multilingual-gemma2",
    apiKey: process.env.SCALEWAY_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
      ? "scaleway/whisper-large-v3"
      : "scaleway/bge-multilingual-gemma2";
  }
});