Code · Mistral AI

Devstral 2 123B

Europe’s answer to the coding-agent race — 123B parameters pointed squarely at agentic software engineering.

Illustration of a coding agent running and testing code
ParamsContextLicenseReleasedPrice/1M in–outModality
123B256KMNPL / commercialOct 2025$0.40 / $1.00Text, agentic code

What it is and who makes it

Devstral 2 123B is Mistral AI’s dedicated agentic coding model, released in October 2025. It’s not a general chat model with a coding preset — it’s trained to behave like a software engineer inside a repo: read the codebase, plan the change, edit across files, run the tests, inspect the failures, try again. Mistral positions it at the same job OpenAI’s Codex and Alibaba’s Qwen 3 Coder do, from a Paris HQ with European data-residency appeal.

It ships under Mistral’s Modified Non-Production License (MNPL), which is a real constraint compared to Apache 2.0 — more on that below — but hosted access via La Plateforme and partners is straightforward, and pricing at $0.40/$1.00 per million input/output tokens is aggressive for a 123B-class specialist.

Architecture and what’s under the hood

Public detail is limited, so take this as informed sketching, not documentation. Devstral 2 is generally understood to be built on Mistral’s large dense/MoE lineage, fine-tuned and post-trained specifically for agentic coding: reinforcement learning on multi-file edits, test-driven iteration and long tool-use chains. The 256K context window is doing real work here — agentic runs accumulate transcripts, file dumps and test output fast, and a small window kills the loop.

Mistral hasn’t published layer counts or attention details, and third-party teardowns are thin. The safe bet: expect Mistral-family traits (sliding-window attention heritage, Tekken tokenizer) and tune expectations accordingly. What matters operationally is behavior — it’s been optimized to keep going through a failing test suite instead of bailing with an apology.

Strengths

  • SWE-bench Verified ~72 (approx., as of Nov 2026) — genuinely competitive with the top proprietary agents, not a charity case.
  • LiveCodeBench ~70 (approx.) — strong general code reasoning, not just agent-loop performance on curated tasks.
  • 256K context holds real repos, long issue threads and test output without gymnastics.
  • Agentic by default. It’s trained for the edit-test-fix loop, not for next-token completion.
  • European pedigree. For orgs with EU data-residency or vendor-risk requirements, Mistral is often the only non-US option that clears the bar.
  • Cost-effective at scale. $0.40/$1.00 is far below proprietary flagship pricing for comparable SWE-bench territory.

Weaknesses and failure modes

  • The license is the asterisk. MNPL is not Apache 2.0 — commercial and production use need checking against the exact terms or a paid La Plateforme agreement. Don’t assume you can just ship weights in your product.
  • 123B is heavy to self-host. You want multi-GPU or a serious quantization pipeline; this isn’t a single-4090 weekend project.
  • Weaker outside code. Ask it to write a marketing brief and you’ll get a competent-but-flat one. It’s a specialist.
  • Retry loops can thrash. Like all agents, it can burn tokens cycling through bad fixes on under-specified tasks — constrain scope and budget.
  • Ecosystem lag. Tooling integrations (IDE agents, CLI wrappers) trail OpenAI and Anthropic; expect some glue code.
  • Benchmarks flatter carefully-prompted runs. Real-world SWE-bench-on-your-monorepo is messier — treat ~72 as a ceiling, not a floor.

Best for / avoid for

Best for: autonomous bug fixes, test backfills, dependency upgrades, framework migrations, PR-level refactors, and EU-based teams that need a non-US vendor for their coding agent without giving up serious capability.

Avoid for: general chat, creative writing, tasks requiring guaranteed production-license freedom (use Apache 2.0 models), tiny autocomplete jobs (use Codestral or a small local model), and greenfield architecture debates.

Variants and family

Devstral Small 24B is the lightweight sibling — meaningfully cheaper and self-hostable on a single high-end GPU, at a noticeable capability drop. It slots under Codestral 25.08 (completion-focused) on the task split: Codestral completes, Devstral agents. For the broader family, Mistral Large 3 is the general flagship, and the Devstral lineage has iterated fast on licensing — worth reading the current terms before you commit.

Pricing, access and how to use it

Around $0.40/$1.00 per million input/output tokens via Mistral La Plateforme (as of Nov 2026), with partner hosting through OpenRouter and cloud marketplaces. Access via Mistral client:

from mistralai import Mistral

client = Mistral(api_key="YOUR_KEY")
resp = client.chat.complete(
    model="devstral-2",
    messages=[
        {"role": "user", "content": "The test in tests/test_api.py fails with a 422. Find the bug, fix it, and show the diff."},
    ],
)
print(resp.choices[0].message.content)

OpenAI-compatible endpoint via OpenRouter:

from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="YOUR_KEY",
)
resp = client.chat.completions.create(
    model="mistralai/devstral-2",
    messages=[{"role": "user", "content": "Add retries with backoff to the HTTP client in src/net.py."}],
)
print(resp.choices[0].message.content)

Self-hosting is possible given the weights terms allow it — vllm serve or SGLang on multi-GPU, expecting 256K context to demand serious VRAM. Quantized GGUF routes exist in the community; quality at low quants falls off faster than dense smaller models, so test before committing.

Practitioner aside. Wire Devstral to CI, not to your editor. The win is “open issue → draft PR,” not “fancier autocomplete.” Budget for one human review pass per agent PR and your failure rate halves.

Benchmarks snapshot

Approximate, as of Nov 2026, from public reporting and PeaBox atlas data:

  • SWE-bench Verified ~72 · LiveCodeBench ~70
  • Mistral’s launch materials claim parity with much larger agentic systems on internal agentic suites (approx., unverified)

Grain of salt applies: SWE-bench numbers move with harness, scaffold and prompt, and Mistral’s official harness scores are rarely replicated exactly.

How it stacks up

vs Qwen 3 Coder 480B. Qwen 3 Coder is the raw-capability favorite — Apache 2.0, ~70 SWE-bench Verified, 256K context — and it’s fully open, which sidesteps every licensing conversation. Devstral 2 is smaller to host, European, and arguably better-mannered in agent loops. License-free and maximum capability? Qwen 3 Coder. EU procurement and Mistral tooling? Devstral.

vs Kimi K2. Kimi K2 (1T/32B active) is the Chinese open-weights agentic powerhouse — SWE-bench ~65, TAU-bench ~66, Modified MIT. It costs about the same but self-hosting it is far heavier. Devstral’s pitch is the 123B dense-class footprint with Mistral’s commercial reliability.

PeaBox fit

Devstral 2 pairs cleanly with the PeaBox AI Workbench: run it as the agent brain behind your local dev loop, and keep the deterministic stuff — test runners, linters, diff viewers — in your normal toolchain. Compare its patches against Codex output on the same tickets, then bank the winning prompts in Prompt Library. When an agent produces a mountain of changed files, Data Studio is a decent workspace for sorting, filtering and reporting what actually changed.

Figures approximate as of Nov 2026. Pricing and benchmark scores drift monthly; check the provider’s pricing page before you budget.