Devstral

Also known as: Mistral Devstral

On this page 7

Devstral is a family of open-weight large language models from Mistral AI designed specifically for agentic coding, meaning software engineering tasks in which a model explores a codebase, edits multiple files, runs commands and iterates until a problem is solved. Sometimes called Mistral Devstral, it occupies a distinct place in AI for coding because it targets autonomous agents rather than inline autocomplete.

The first release in May 2025 was developed together with All Hands AI, the team behind the OpenHands agent framework, and its compact size allowed it to run locally on a single high-end GPU or a well-equipped laptop. Later versions extended the family with larger models and higher scores on the SWE-bench Verified benchmark of real GitHub issues.

What Devstral is designed to do

Devstral is trained to act as the reasoning engine inside a coding agent. Instead of predicting the next line in an editor, it receives a task such as a bug report, inspects the repository through tool calls, proposes changes and checks them by running tests or shell commands. This loop of observation, action and verification is what separates agentic models from classic code completion models.

Mistral AI positions Devstral alongside, not in place of, Codestral, its model family for fast completion and fill-in-the-middle suggestions. The two families address different layers of the developer workflow: Codestral serves the editor keystroke by keystroke, while Devstral serves multi-step tasks spanning many files.

AspectDevstralCodestral
Primary roleAgentic software engineeringCode completion and generation
Typical interactionMulti-step tool-calling loopSingle request in the editor
Key capabilityRepository exploration and editingFill-in-the-middle suggestions
Latency priorityModerateVery low
Typical hostAgent framework or CLIIDE plugin
Devstral and Codestral compared

Model versions and key characteristics

The Devstral line has evolved in several releases, each balancing model size, license and benchmark performance. The original Devstral Small was a 24-billion-parameter model fine-tuned from Mistral Small 3.1, with a context window of about 128,000 tokens and an Apache 2.0 license. Later releases improved tool use and added a larger model aimed at heavier workloads.

The table summarizes the main releases. Benchmark figures are those reported by the vendor at release, and independent results can differ depending on the agent scaffold, prompts and evaluation settings used.

ReleaseApproximate sizeAvailabilityReported SWE-bench Verified
Devstral Small 1.0 (May 2025)24B parametersOpen weights, Apache 2.0About 47%
Devstral Small 1.1 (July 2025)24B parametersOpen weights, Apache 2.0About 54%
Devstral Medium (July 2025)Not disclosedAPI onlyAbout 62%
Devstral 2 (December 2025)About 123B parametersOpen weights, modified licenseAbout 72%
Devstral Small 2 (December 2025)24B parametersOpen weights, Apache 2.0About 68%
Main Devstral releases

A practical point is that the 24B models fit on consumer hardware when quantized, for example on a GPU with 24 GB of memory or a computer with 32 GB of unified memory. This makes Devstral attractive for teams that require on-premises deployment for confidentiality or compliance reasons.

How Devstral works inside a coding agent

Devstral does not edit files on its own; it relies on an agent scaffold that exposes tools. Frameworks such as OpenHands, Cline and other compatible agents provide functions for reading files, searching the repository, applying edits and executing commands, and the model decides which tool to call next based on the results it observes.

  1. The agent passes the task description and repository context to the model.
  2. Devstral plans and issues tool calls to inspect relevant files.
  3. It proposes multi-file edits and applies them through the scaffold.
  4. The agent runs tests or linters and returns the output to the model.
  5. The loop repeats until tests pass or a step limit is reached.

Because the model was fine-tuned on agent trajectories, it follows tool-calling formats more reliably than general chat models of similar size. Even so, results depend heavily on scaffold quality: the same model can score very differently in two agents.

Choosing and deploying Devstral

Selecting a Devstral variant is mainly a trade-off between capability, cost and control. The decision table below outlines typical situations and the corresponding choice.

SituationRecommended optionReason
Code must stay on siteSmall model, self-hostedOpen weights, modest hardware
Individual developer laptopQuantized small modelRuns locally without cloud
Complex enterprise repositoriesLarger model via API or clusterHigher success rate
Fine-tuning on private codeOpen-weight small modelPermissive license allows it
Lowest-latency autocompleteCodestral insteadDevstral is not built for it
Deployment decision guide

Limitations and risks

Like other coding agents, Devstral can produce plausible but incorrect patches, especially when tests are missing or weak. It may also suggest nonexistent packages, a risk known as package hallucination, or change more code than necessary. Human code review remains essential before merging any agent-generated change.

Agents that execute commands introduce security risks. Running Devstral-driven agents in a sandboxed container with limited network and credential access is strongly advised. Finally, benchmark scores measure narrow tasks; they are not a guarantee of performance on a specific codebase, so teams should evaluate on their own repositories.

Operational costs also deserve attention. Agentic sessions consume far more tokens than chat requests, because every tool result is fed back into the context, and long sessions can approach the context limit on large repositories. Teams usually mitigate this with repository maps, focused file retrieval and step budgets, and they monitor how often the agent finishes a task without human correction to judge whether the deployment is worth its compute cost.

License terms differ between releases, so legal teams should check the license of each specific model before commercial use or redistribution of fine-tuned derivatives.

In simple terms

Devstral is an AI model that works like a junior programmer with a checklist. You give it a task, such as fixing a bug. It reads the project files, finds the problem and changes the code. Then it runs the tests to see if the fix works.

Smaller versions are free to download and can run on your own computer. That means private code never has to leave the company. A person should still review every change before it is accepted.

A practical example

A software team at a regional healthcare provider is not allowed to send source code to external cloud services. The team installs a quantized Devstral Small model on an internal server with one 48 GB GPU and connects it to an open-source agent framework running inside isolated containers.

Developers assign it routine tickets, such as updating a deprecated date library across about forty files in a Python service. The agent locates every usage, applies the edits, runs the test suite and reports two failing tests, which it then fixes. A developer reviews the final diff in about twenty minutes, compared with an estimated half day of manual work, and the code never leaves the internal network.