What it is and who makes it
Codestral 25.08 is Mistral AI’s dedicated code model, refreshed in August 2025. Where Devstral is the agent, Codestral is the completion engine: a 22B model tuned to sit inside your editor and spit out the right next chunk — a function body, a loop, a config block, a test fixture. It’s also surprisingly good at repo Q&A, thanks to a 256K context window that can swallow a mid-sized codebase whole.
Licensing is the part people skip: Codestral ships under Mistral’s Modified Non-Production License (MNPL) for the weights, meaning production commercial use requires a paid La Plateforme agreement. The hosted API is straightforward; the raw weights are not Apache 2.0. Read the license page before you bake it into anything you sell.
Architecture and what’s under the hood
Mistral doesn’t publish a full teardown. What’s broadly understood: a dense 22B decoder built from the Mistral family recipe — Tekken tokenizer, RoPE, grouped-query attention — with a training mix dominated by source code across a very wide language range (Mistral has long bragged about 80+ languages, and the ratio shows in none of them being an afterthought). The 256K context comes from Mistral’s extended-context techniques, and it matters less for the model’s raw reasoning than for repo-aware completion and whole-codebase questions.
Don’t expect architectural novelty here; expect disciplined fine-tuning on code with strong fill-in-the-middle and completion objectives, which is exactly why it feels so good in an editor compared to general chat models doing code.
Strengths
- HumanEval ~90 · MBPP ~85 (approx., as of Nov 2026) — near-frontier numbers on standard code-generation suites for a 22B model.
- 256K context — paste the whole module, ask for the refactor; few code models at this price handle that corpus.
- Speed. 22B completes fast; latency in an editor loop is what completion models live or die by.
- Broad language support — Python, JS/TS, Java, Go, Rust, C++, plus the enterprise long tail.
- FIM and infill are first-class citizens, not bolt-ons.
- Cheap. $0.12/$0.35 per million input/output tokens on the hosted API.
Weaknesses and failure modes
- Not an agent. No test-run-fix loop. Give it a multi-step task and it will hand you beautifully formatted first drafts of step one.
- MNPL is a real constraint. Production use needs the commercial agreement; don’t discover this at launch.
- LiveCodeBench ~55 (approx.) — meaningfully weaker than the big agentic coding models on genuinely hard, contest-style problems.
- Recency drift. Anything that became standard after mid-2025 will be shaky — pin versions, verify APIs.
- Completion bias. It tends to continue patterns rather than question them — including bad ones.
- Only text and code. No images, no diagrams, no design mocks.
Best for / avoid for
Best for: inline completion, infill, docstring-to-implementation, test-stub generation, repo-aware Q&A (“where is X configured?”), migrating idioms across many files, and high-volume code transformation pipelines.
Avoid for: autonomous PR agents (use Devstral 2 or Qwen 3 Coder), hard algorithmic puzzles, tasks demanding license-clean open weights (use Qwen 2.5 Coder 32B), and anything where “it usually works” isn’t good enough.
Variants and family
Codestral is effectively a single-track line — the 25.08 tag is the August 2025 refresh. In Mistral’s coding family tree, the split is clean: Codestral completes, Devstral 2 acts, and Qwen 2.5 Coder 32B is the Apache-2.0 outside option. If you want the same completion sweetness without the license conversation, that’s your move.
Pricing, access and how to use it
Hosted via Mistral La Plateforme at roughly $0.12/$0.35 per million input/output tokens (as of Nov 2026), also on Azure AI Foundry and partner marketplaces. Weights are downloadable under MNPL terms. Mistral client:
from mistralai import Mistral
client = Mistral(api_key="YOUR_KEY")
resp = client.chat.complete(
model="codestral-25.08",
messages=[
{"role": "user", "content": "Complete this TypeScript function:\n\nfunction chunk<T>(arr: T[], size: number): T[][] {\n // your code here\n}"},
],
temperature=0.1,
)
print(resp.choices[0].message.content)
Fill-in-the-middle style call (editor integrations use this path):
resp = client.fim.complete(
model="codestral-25.08",
prompt="def validate_email(addr):\n ",
suffix="\n return True\n",
)
print(resp.choices[0].message.content)
Self-hosting the MNPL weights is possible for non-production/research use; for anything commercial, the API agreement is the clean route. Local parity check via Hugging Face transformers works well enough for smoke tests.
Practitioner aside. Put Codestral in the editor and keep your thinking-model for planning. The two-layer setup — Codestral for the next line, a bigger model for the next decision — beats either one alone, and costs less than you’d think.
Benchmarks snapshot
Approximate, as of Nov 2026, from public reporting and PeaBox atlas data:
- HumanEval ~90 · MBPP ~85 · LiveCodeBench ~55
- Mistral’s own materials emphasize completion and repo-QA leaderboards over contest-style suites (approx.)
HumanEval flatters every modern code model; LiveCodeBench is the more honest signal, and there Codestral trails the agentic heavyweights — that’s the trade for its speed and completion focus.
How it stacks up
vs Qwen 2.5 Coder 32B. Qwen wins on licensing (Apache 2.0), breadth of open tooling and raw HumanEval parity; Codestral wins on context (256K vs 128K), completion ergonomics and Mistral’s commercial support fabric. If your legal team squints at MNPL, Qwen. If you want the smoothest hosted completion API, Codestral.
vs Devstral 2. Different jobs: Devstral 2 runs multi-file agent loops at ~72 SWE-bench; Codestral completes brilliantly inside one file and won’t reliably survive a 400-line tool chain. Completion-first workflows favor Codestral; autonomy-first workflows favor Devstral.
PeaBox fit
Codestral slots into the PeaBox AI Workbench as the local completion brain next to bigger reasoning models — a two-tier setup that keeps most tokens cheap. Stash your completion and repo-QA prompt templates in Prompt Library so your editor plugin and your CI both call the same tuned patterns. For bulk code-cleanup batches, stage and review the outputs in Data Studio before committing.
Figures approximate as of Nov 2026. Pricing and benchmark scores drift monthly; check the provider’s pricing page before you budget.