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.
import { streamText } from 'ai'
const result = streamText({ model: 'mistral/devstral-small-2', prompt: 'Why is the sky blue?'})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.
Frequently Asked Questions
What is Devstral Small 2's SWE-bench Verified score?
68.0%, matching models up to 5x its parameter size.
Does Devstral Small 2 support image inputs?
Yes. Multimodal input is one of the key additions over the original Devstral Small, enabling workflows that combine code and visual assets.
What is the context window for Devstral Small 2?
256K tokens, the same as Devstral 2, which is a significant upgrade from the original Devstral Small.
What is the license for Devstral Small 2?
Apache 2.0, permitting unrestricted commercial use.
How does Devstral Small 2 compare to Devstral 2?
Devstral 2 (123B) achieves higher SWE-bench scores. Devstral Small 2 (24B) achieves 68.0% at a much smaller parameter count.
What is the API pricing for Devstral Small 2?
This page lists the current rates. Multiple providers can serve Devstral Small 2, so AI Gateway surfaces live pricing rather than a single fixed figure.