Back to Models
mistralai logoMistral
devstral-2512

Devstral 2 2512

Devstral 2 is a state-of-the-art open-source model by Mistral AI specializing in agentic coding. It is a 123B-parameter dense transformer model supporting a 256K context window. Devstral 2 supports exploring codebases and orchestrating changes across multiple files while maintaining architecture-level context. It tracks framework dependencies, detects failures, and retries with corrections—solving challenges like bug fixing and modernizing legacy systems. The model can be fine-tuned to prioritize specific languages or optimize for large enterprise codebases. It is available under a modified MIT license.

12/9/2025
262,144 tokens
Input: $0.44/M
Output: $2.20/M

Specifications

Modalities

Input
text
Output
text

Supported Parameters

frequency_penalty
max_tokens
presence_penalty
response_format
seed
stop
structured_outputs
temperature
tool_choice
tools
top_p

Data policy

Prompt retention
Not retained — every host this model runs on is configured not to retain prompts
Training
Not used for training

Whether a provider trains on prompts is a declared value from our terms with them. Retention is determined from the upstream listing for every host this model can reach. Neither is guessed.

Measured performance

Time to first response (p50)1.1s
Throughput (p50)250 tokens/s

    Measured through FastMetal's own gateway over the last 30 days (653 first-response samples).

    Throughput is sampled once a day: the median of 26 observations over the last 30 days.

    Time to first response is measured to the first streamed chunk; throughput counts all output tokens, including reasoning tokens. These are observations, not a performance guarantee.

    Code Examples

    curl https://api.fastmetal.ai/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{
        "model": "devstral-2512",
        "messages": [{"role": "user", "content": "Hello!"}]
      }'

    How Devstral 2 2512 actually answers

    Real responses to our standard prompts, recorded on FastMetal.

    Count the number of 'r's in 'strawberry'

    Count the number of 'r's in 'strawberry'. Explain your reasoning step by step.

    Let's count the number of 'r's in the word "strawberry" step by step. The word is: **strawberry** We'll go through each letter one by one: 1. **s** - Not 'r' 2. **t** - Not 'r' 3. **r** - This is an 'r' (count: 1) 4. **a** - Not 'r' 5. **w** - Not 'r' 6. **b** - Not 'r' 7. **e** - Not 'r' 8. **r** - This is an 'r' (count: 2) 9. **r** - This is an 'r' (count: 3) 10. **y** - Not 'r' So, the total number of 'r's in "strawberry" is **3**.
    2.3s response185 output tokens

    Debug This Error

    I'm getting the following error in my Node.js application: TypeError: Cannot read properties of undefined (reading 'map') at UserList (/app/components/UserList.js:12:25) at renderWithHooks (/app/node_modules/rea…

    The error occurs because you're trying to call `.map()` on `users` when `users` is `undefined`. This happens when the `users` prop is not passed to the `UserList` component or is explicitly passed as `undefined`. ### Solutions: 1. **Provide a default value** (recommended): ```jsx function UserList({ users = [] }) { return ( <ul> {users.map(user => <li key={user.id}>{user.name}</li>)} </ul> ); } ``` This ensures `users` is always an array, even if the prop is not provided. 2. **Add a conditional check**: ```jsx function UserList({ users }) { if (!users) return null; // or return a loading/empty state return ( <ul>…
    3.9s response406 output tokens

    Code Review

    Please review the following Python function and suggest improvements for readability, performance, and best practices: def get_data(url, retries=3): import requests import time for i in range(retries):…

    Here's a comprehensive review of your function with suggested improvements: ### 1. **Error Handling** - Current: Catches all exceptions with a bare `except:` which is bad practice (could hide bugs) - Improvement: Catch specific exceptions (like `requests.exceptions.RequestException`) ### 2. **Imports** - Current: Imports inside function (not ideal for performance) - Improvement: Move to top of file (Python convention) ### 3. **Retry Logic** - Current: Uses a simple for-loop with fixed sleep - Improvement: Consider exponential backoff for retries ### 4. **Status Code Handling** - Current: Only checks for 200 - Improvement: Consider other successful status codes (2xx) ### 5. **Data Proces…
    5.9s response837 output tokens

    Compare these answers side by side with other models →

    Frequently asked questions

    How much does the Devstral 2 2512 API cost?
    On FastMetal, Devstral 2 2512 is billed per token: $0.44 per 1M input tokens and $2.20 per 1M output tokens on a US-dollar account, before tax. Usage is drawn from a prepaid balance; there is no subscription or monthly fee.
    Can I call Devstral 2 2512 with the OpenAI SDK?
    Yes. Point base_url at https://api.fastmetal.ai/v1 and pass "devstral-2512" as the model; existing OpenAI-style code works unchanged, including streaming, tool calls and structured output.
    What is the context window of Devstral 2 2512?
    262,144 tokens, shared between the prompt and the response.
    What do I need to try Devstral 2 2512?
    Create an account and add credit; the model is then available both in the browser chat and over the API. There is no contract or minimum spend.

    Try Devstral 2 2512 right now

    Devstral 2 2512 is available on FastMetal through one API key. Start in the browser, or call it from the OpenAI SDK.