Codestral — Mistral's code model line explained
Codestral isn’t a single version — it’s a line: Mistral AI’s family of models built specifically for programming. This page describes the line as a whole: what it’s built for, where its limits are, and when you’d pick it over a general-purpose model. For version-specific details on the current model, see the glossary entry → Codestral.
Current / as of September 2026
The current model in the line is simply called Codestral (the 25.08 generation with a 256K context). The early weights remain under Mistral’s Non-Production License (MNPL) — research and testing allowed, production use through the commercial API. Mistral has not announced an Apache 2.0 relicensing for the Codestral line. This page stays version-agnostic; the specific numbers live in the glossary.
What Codestral is built for
Codestral is a code specialist, not a chat model with a talent for code. That distinction isn’t marketing — it decides where the model belongs. The line is trained for three things: code completion in the editor, generation of whole functions with their tests, and fill-in-the-middle — the model knows the text both before and after the cursor and closes the gap, rather than only writing forward. That’s exactly what IDE autocomplete needs, and it’s exactly what general-purpose models can often only fake through detours.
The second building block is context. The current generation works with 256,000 tokens — enough to hold several related modules or one large file in a single call, instead of feeding it snippet by snippet. For code assistants that are supposed to understand the shape of a project, that’s the jump that matters in practice.
Suitability profile
- Coding 4.5 / 4.5 · Feld-Spitze
- Reasoning 3.5 / 4.5 · DeepSeek V4-Pro u. a.
- Text 2.5 / 4 · DeepSeek V4-Pro u. a.
- Vision 1 / 3.5 · DeepSeek V4-Pro u. a.
- Speed 4 / 4 · Feld-Spitze
- Kosten-Eff. 4 / 4.5 · DeepSeek V4-Pro u. a.
Eignung 0–5 · redaktionelle Einordnung, kein Benchmark · gestrichelt = Feld-Bestwert je Achse
The axes are an editorial read, not a benchmark. The pattern is clear: coding and speed up front, solid cost-efficiency, a distinct weakness on vision and general text. Codestral is a sharp tool for one job, not an all-rounder.
Positioning in the field
Redaktionelle Einordnung, kein Benchmark
Codestral sits in the fast, cost-efficient zone — not in the frontier band of the expensive reasoning flagships. That’s by design: an autocomplete model has to be fast and cheap enough to run on every keystroke. If you need hours-long autonomous agent runs or deep multi-step reasoning, you’re better served higher up this map.
Picking a model: when Codestral, when something else
- Codestral, when you’re building IDE autocomplete, function generation or fill-in-the-middle into a developer or CI pipeline and latency plus token cost matter.
- Magistral, when the task calls for multi-step reasoning — mathematical or logical problems, structured planning. Magistral thinks, Codestral completes.
- Devstral, when an agent should solve whole engineering tasks across multiple files on its own — real GitHub issues in an agent scaffold, for instance. Codestral writes code, Devstral gets tasks done.
- For a broader read on all the families, see the overview of AI model families.
FAQ
- Codestral is Mistral AI's code-specialised model line — for code completion, function generation and fill-in-the-middle in IDEs and CI pipelines, not for broad chat or knowledge tasks.
- Codestral completes code right in the editor. Devstral is an agentic model that solves whole software-engineering tasks across multiple files on its own, such as real GitHub issues in an agent scaffold.
- Codestral is tailored to code, Magistral to multi-step reasoning with a transparent chain of thought. If you want to solve mathematical or logical problems, Magistral serves you better than Codestral.
- Yes — the original 22B-parameter version is available as open weights to download and can run on your own hardware, but only within the Non-Production License for research and testing.
- For research and testing, yes. Commercial or production use — including offering it as a free hosted service — requires the paid API or a separate licensing agreement with Mistral AI.