Skip to content
Dashboard

Devstral Small 2

Devstral Small 2 is a 24B agentic coding model with 68.0% on SWE-bench Verified, a context window of 256K tokens, and multimodal input support. Devstral Small 2 matches models up to five times its size on coding benchmarks.

Tool UseVision (Image)
index.ts
import { streamText } from 'ai'
const result = streamText({
model: 'mistral/devstral-small-2',
prompt: 'Why is the sky blue?'
})

Playground

Try out Devstral Small 2 by Mistral AI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

mistral logo
mistral logo

Ask Devstral Small 2 anything to try it out.

Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
ZDR
No Training
Release Date
Mistral AI
256K
0.4s
66tps
$0.10/M$0.30/M——
12/09/2025
Throughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Latency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Uptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

More models by Mistral AI

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Per Query
Capabilities
Providers
ZDR
No Training
Release Date
256K
0.4s
61tps
$0.50/M$1.50/M——
mistral logo
12/02/2025
256K
0.3s
80tps
$0.20/M$0.20/M——
+1
mistral logo
12/02/2025
128K
0.3s
117tps
$0.10/M$0.10/M——
mistral logo
10/16/2024
128K
0.3s
92tps
$0.15/M$0.15/M——
mistral logo
10/16/2024
32K
0.4s
$0.10/M$0.30/M——
mistral logo
09/17/2024
$0.10/M——
mistral logo
12/11/2023

About Devstral Small 2

Devstral Small 2 is Mistral AI's second-generation compact software engineering agent, introduced alongside Devstral 2 as the smaller tier of the family. At 24B parameters, it scores 68.0% on SWE-bench Verified, matching models up to five times its size.

The key additions over the original Devstral Small are a context window of 256K tokens (enabling full-repository context) and multimodal input support. Agents can now process images alongside code. This makes Devstral Small 2 useful for UI-debugging workflows where you correlate screenshots of broken interfaces with frontend code, or for reading architecture diagrams in documentation.

Devstral Small 2 is released under Apache 2.0.

What To Consider When Choosing a Provider

  • Configuration: At 24B parameters, Devstral Small 2 reaches comparable SWE-bench performance to models 5x its size.
  • Zero Data Retention: AI Gateway supports Zero Data Retention for this model via direct gateway requests (BYOK is not included). To configure this, check the documentation.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

When to Use Devstral Small 2

Best For

  • Compact agentic coding: Tasks requiring a context window of 256K tokens at 24B parameters
  • Multimodal debugging workflows: Combining code and screenshots or diagrams
  • Apache 2.0 for commercial products: Teams that need an Apache 2.0 license for a coding model

Consider Alternatives When

  • Higher SWE-bench scores: You need a stronger score (consider Devstral 2)
  • No image input needed: Devstral Small meets your accuracy bar
  • Reasoning-first problem solving: Tasks where deep reasoning matters more than agentic code execution (consider Magistral models)

Conclusion

Devstral Small 2 competes with systems five times its scale on real-world software engineering benchmarks. It adds a context window of 256K tokens and multimodal input over the first generation. Choose it when you need a compact agentic coding model under Apache 2.0.