Codestral & Devstral: Complete Guide — Architecture, HumanEval Benchmarks, FIM, API Pricing & Devstral Agentic Mode 2026
Model Overview
Codestral, released by Mistral AI in May 2024 and refined through 2026, is a 22-billion-parameter code generation model designed for developer productivity through inline completion, chat, and agentic coding workflows. Alongside Codestral, Mistral released Devstral in 2025 — a specialised agentic variant fine-tuned for multi-file software engineering tasks and SWE-bench performance. Codestral supports a 32,000-token context window and includes native fill-in-the-middle (FIM) training for suffix-aware IDE completion, making it a direct competitor to GitHub Copilot and DeepSeek Coder. The model is trained on 80+ programming languages with a curated mix of public source code, documentation, and code-comment pairs. Codestral scores 81.1% on HumanEval pass@1 — competitive but below the 90%+ frontier set by DeepSeek Coder V3 and Qwen2.5-Coder. Its key differentiators are fast inference (22B dense model), a low API price of $0.10 per 1 million tokens, strong European data residency (Mistral is a French company), and Devstral's agentic capabilities for real-world software engineering. Codestral is released under the Mistral Non-Production License (MNPL), which permits research and testing but requires a commercial licence for production deployment — a notable restriction compared to MIT-licensed alternatives.
Architecture & Technical Deep Dive
Codestral is a 22B dense decoder-only transformer built on the Mistral architecture family. Unlike MoE models (DeepSeek Coder V3) or larger dense models (Qwen2.5-Coder-32B), Codestral prioritises inference speed and a compact footprint. Devstral, its agentic sibling, shares the base architecture but is fine-tuned with tool-use and multi-file editing capabilities for SWE-bench-style tasks.
Core Architecture
Codestral uses a dense decoder-only transformer with 22B parameters, 56 layers, a hidden size of 6144, and grouped-query attention (GQA) for efficient inference. The architecture includes Rotary Position Embeddings (RoPE), RMSNorm, SwiGLU activation, and a byte-pair encoding (BPE) tokeniser with a 32K vocabulary adapted for code. Being a dense model, all 22B parameters are activated per token — simpler than MoE but higher inference cost per token than DeepSeek Coder V3's ~3B active. The model is served in BF16 and FP8 formats; FP8 reduces VRAM to ~24GB, enabling inference on a single RTX 4090 or A10G.
Training Methodology
Codestral is trained on a curated corpus of 80+ programming languages drawn from public source repositories, documentation, and code-comment pairs. Training proceeds in three stages: (1) unsupervised pre-training on raw code to learn syntax and idioms, (2) supervised fine-tuning on high-quality instruction-response pairs including FIM and chat formats, and (3) reinforcement learning from human feedback (RLHF) to improve suggestion quality. Devstral adds a fourth stage: agentic fine-tuning on multi-file editing tasks with tool-use (file read, file edit, shell command, test runner), enabling it to plan and execute multi-step software engineering tasks.
Fill-in-the-Middle (FIM) Training
Codestral is trained with FIM for suffix-aware inline completion — the core feature of IDE code assistants. The model is presented with a prefix, a sentinel token, a suffix, a second sentinel, and asked to generate the middle. Mistral reports that FIM training improves suggestion acceptance rates by 25–30% in editor integrations. Codestral uses the [PREFIX]
Devstral Agentic Mode
Devstral is the agentic variant of Codestral, fine-tuned for SWE-bench-style tasks: given a GitHub issue, plan a fix, edit multiple files, run tests, and iterate. Devstral Small (22B) scores 40% on SWE-bench Verified; Devstral Medium (larger, API-only) scores 46%, leading all open-weights agentic code models in 2026. Devstral uses a tool-use loop: it can read files, edit files, run shell commands, and execute tests, iterating until the task is complete. This is Mistral's answer to GitHub Copilot Workspace and Cursor Composer. Devstral is released under MNPL for the Small variant and commercial licence for the Medium variant.
Multi-File & Repository Context
Codestral's 32K context window holds ~10–20 files per prompt — smaller than DeepSeek Coder V3 (128K) and Qwen2.5-Coder (128K) but sufficient for most inline completion and chat tasks. Devstral extends to 256K context for agentic tasks that require reading many files. For repo-level retrieval, the Continue IDE extension and Cursor both support vector-store-backed retrieval that augments the Codestral prompt with relevant snippets. Because Codestral is a dense model, longer contexts increase inference cost linearly — a trade-off vs MoE models.
Inference & Serving
Self-hosting Codestral (FP8) requires ~24GB VRAM — a single RTX 4090, A10G, or L4 GPU suffices, making it one of the few 20B+ code models that runs on consumer hardware. BF16 requires ~44GB VRAM (A100 40GB is marginal; A100 80GB or 2x 4090 recommended). With vLLM, a single A10G achieves 40–60 tokens/sec at 32K context. The Mistral API serves Codestral at $0.10/1M input and $0.30/1M output tokens — competitive with DeepSeek ($0.14/1M) and cheaper than GPT-4o. The API is OpenAI-compatible. Devstral Medium is API-only (weights not released).
Code Generation Benchmarks & Scores
Scores based on publicly available data as of July 2026. Independent verification recommended.
Code Generation Benchmarks
| Benchmark | Codestral 22B | Devstral Medium | GitHub Copilot | DeepSeek Coder V3 | Qwen2.5-Coder-32B |
|---|---|---|---|---|---|
| HumanEval (pass@1) | 81.1 | — | 90.0 | 90.2 | 92.7 |
| MBPP (pass@1) | 78.2 | — | 83.0 | 82.6 | 86.5 |
| SWE-bench Verified | — | 46.0 | 33.0 | 24.0 | 23.0 |
| LiveCodeBench | 33.0 | — | 38.5 | 39.2 | 37.5 |
| BigCodeBench | 65.0 | — | 71.0 | 70.5 | 72.0 |
| MultiPL-E (avg) | 70.0 | — | 76.0 | 75.0 | 77.5 |
| DevEval | 44.5 | — | 48.0 | 47.0 | 49.0 |
Language-Specific Performance
| Language | HumanEval-X (pass@1) | MBPP-X (pass@1) | Notes |
|---|---|---|---|
| Python | 81.1 | 78.2 | Primary language; strongest results |
| JavaScript | 78.0 | 74.0 | Good for Node.js and frontend |
| TypeScript | 77.5 | 73.5 | Type-aware completion supported |
| Java | 75.0 | 71.0 | Spring and Maven patterns |
| C++ | 73.0 | 69.0 | STL and modern C++17/20 |
| Go | 72.0 | 68.0 | Idiomatic goroutine patterns |
| Rust | 66.0 | 60.0 | Weaker; borrow-checker awareness limited |
| SQL | 76.0 | — | Good for SELECT, JOIN, window functions |
| Bash | 70.0 | — | Scripting and CI/CD |
| PHP | 71.0 | — | Laravel and Symfony supported |
Performance Analysis
Codestral 22B is a mid-tier code model: its 81.1% HumanEval pass@1 is solid but trails the 90%+ frontier set by DeepSeek Coder V3 (90.2%), Qwen2.5-Coder (92.7%), and GitHub Copilot (90.0%). On MBPP (78.2%), LiveCodeBench (33.0%), and MultiPL-E (70.0%), it is consistently 5–10 points behind the leaders. The standout is Devstral Medium's SWE-bench Verified score of 46% — the highest among all models in this comparison, beating GitHub Copilot's agentic mode (33%) by a wide margin. This makes Devstral the leading model for agentic, multi-file software engineering tasks in 2026. Codestral's language coverage is broad but not exceptional; Python (81.1%) and JavaScript (78.0%) are its best languages, while Rust (66.0%) is the weakest mainstream language. The 32K context window is a limitation compared to the 128K windows of DeepSeek and Qwen2.5-Coder, restricting it to ~10–20 files per prompt. Codestral's real advantages are speed (22B dense runs on a single consumer GPU), price ($0.10/1M), European data residency, and Devstral's agentic leadership. For teams whose primary use case is agentic SWE-bench-style tasks, Devstral is the best choice; for raw completion quality, DeepSeek or Qwen2.5-Coder are stronger.
Speed & Latency
Self-hosted (FP8, 1x RTX 4090 / A10G 24GB): 40–60 tokens/sec at 32K context with vLLM. Self-hosted (BF16, 1x A100 80GB): 50–70 tokens/sec. Mistral API: 80–120 tokens/sec (streaming), 150–400ms time-to-first-token. Local (Ollama, Q4_K_M on 32GB RAM): 15–25 tokens/sec. Codestral is one of the fastest 20B+ code models due to its dense architecture and efficient GQA attention.
API Access, Pricing & Integration Guide
Looking for codestral-22b API pricing in 2026? Below is the complete pricing table, code examples, and integration guide.
API Pricing Table (as of July 2026)
| Model | Input (per 1M) | Output (per 1M) | Context | Best For |
|---|---|---|---|---|
| Codestral 22B | $0.10 | $0.30 | 32K | Fast code completion & chat |
| Devstral Small | $0.10 | $0.30 | 256K | Agentic coding (self-hostable) |
| Devstral Medium | $0.30 | $0.90 | 256K | Best agentic SWE-bench |
| Codestral Mamba | $0.10 | $0.30 | 256K | Long-context code chat |
| Self-hosted (FP8) | Free (your GPU) | Free | 32K | Privacy, unlimited usage |
Free Tier & Trial Access
Mistral La Plateforme offers a free tier with rate-limited access to Codestral for testing and prototyping (approximately 1 request/second and 500K tokens/month). The MNPL-licensed weights can be downloaded from HuggingFace for free self-hosting for research and testing. Production use requires a commercial licence from Mistral AI. New accounts receive a small credit grant for API exploration.
API Quick Start
# --- Option 1: Mistral API (OpenAI-compatible) ---
pip install mistralai
from mistralai import Mistral
client = Mistral(api_key="your-mistral-api-key")
# Chat / instruct mode
response = client.chat.complete(
model="codestral-latest",
messages=[
{"role": "user", "content": "Write a Python async function to fetch JSON from a URL with retry."},
],
temperature=0.0,
)
print(response.choices[0].message.content)
# --- Option 2: Fill-in-the-Middle (FIM) for inline completion ---
fim_response = client.fim.complete(
model="codestral-latest",
prompt="def merge_sort(arr):\n if len(arr) <= 1:\n return arr",
suffix="\n return merged",
temperature=0.0,
max_tokens=64,
)
print(fim_response.choices[0].message.content)
# --- Option 3: Devstral agentic mode (SWE-bench-style) ---
# Use the Mistral Agents API with tool-use:
agent_response = client.agents.complete(
model="devstral-medium-latest",
messages=[
{"role": "user", "content": "Fix the failing test in tests/test_auth.py. The login function doesn't handle expired tokens."},
],
tools=[{"type": "file_read"}, {"type": "file_edit"}, {"type": "code_execution"}],
)
# --- Option 4: Self-host with vLLM ---
# pip install vllm
# vllm serve mistralai/Codestral-22B-v0.1 --quantization fp8
# --- Option 5: Local with Ollama ---
# ollama pull codestral:22b
# ollama run codestral:22b "Write a Go HTTP handler"
Supported API Features
Compatible Platforms & Integrations
Fine-Tuning, RAG & Advanced Use
Fine-Tuning Availability
Codestral weights are available on HuggingFace under the Mistral Non-Production License (MNPL), which permits research, testing, and fine-tuning for non-production purposes. Production use of fine-tuned Codestral requires a commercial licence from Mistral AI. LoRA fine-tuning runs on a single A100 80GB in 6–12 hours with 10K–50K code examples. Full fine-tuning requires 4–8x A100/H100 and 1–2 days. Devstral Small is also fine-tunable under MNPL; Devstral Medium is API-only (weights not released). For teams that need fully open fine-tuning without licence restrictions, DeepSeek Coder V3 (MIT) or Qwen2.5-Coder (Apache 2.0) are better choices.
Fine-Tuning Requirements
LoRA fine-tuning: 1x A100 80GB (or 2x RTX 4090 with QLoRA), 10K–50K code examples in JSONL chat or FIM format, transformers + PEFT, 6–12 hours. Full fine-tuning: 4–8x A100/H100 80GB, 50K+ examples, 1–2 days. Recommended data format: Mistral chat format ({"role": "user", "content": "..."} / {"role": "assistant", "content": "..."}). For FIM fine-tuning, use the [PREFIX]
Fine-Tuning Use Cases
- Fast inline code completion — 22B dense model runs on a single consumer GPU (RTX 4090) via FP8
- Devstral agentic coding — SWE-bench Verified 46%, the leading open agentic code model for multi-file fixes
- European data residency — Mistral La Plateforme offers EU-hosted inference for GDPR-sensitive teams
- Cost-effective code chat — $0.10/1M input tokens, competitive with DeepSeek ($0.14/1M)
- Fine-tuning on proprietary code (research/non-production) — LoRA on self-hosted weights under MNPL
- Code migration and refactoring — Devstral agentic mode can plan and execute multi-file migrations
- Automated test generation — generate unit tests with Devstral's tool-use (read code, write tests, run tests)
- CI/CD code review — deploy Codestral as a CI/CD step that reviews PRs at $0.10/1M tokens
RAG Integration Guide
For repository-level assistance, use retrieval-augmented generation: chunk your repo (512–1024 tokens), embed with a code embedding model (Voyage-code, BGE-code), store in a vector DB (Qdrant, Weaviate), and retrieve relevant snippets to augment the Codestral prompt. The 32K context window holds ~10–20 retrieved files per query. Devstral's 256K context can hold 50–100 files, reducing reliance on retrieval for agentic tasks. The Continue IDE extension implements repo-level retrieval out of the box. For best results with Codestral, retrieve by semantic similarity and symbol-name overlap, and include the file's import block.
Prompt Engineering Tips
- Use the dedicated FIM endpoint (/v1/fim/completions) for inline completion — it handles prefix/suffix natively
- Set temperature to 0.0–0.2 for code generation and 0.7 for code explanation
- For Devstral agentic tasks, provide a clear issue description and the file tree in the initial prompt
- Include relevant type definitions and imports in the prompt — Codestral uses them for type-aware suggestions
- For repo-level tasks with Codestral (32K), retrieve the top 5–10 most relevant files rather than dumping everything
- Use Mistral La Plateforme EU endpoint for GDPR-sensitive deployments
- For self-hosting, use FP8 quantisation in vLLM — fits on a single 24GB GPU with <1% quality loss
- Remember: MNPL permits research and testing but production use requires a commercial licence from Mistral
Use Cases, Strengths & Limitations
Top 10 Real-World Use Cases
Fast Inline Code Completion
Codestral's 22B dense model runs on a single consumer GPU (RTX 4090) via FP8, making it one of the few 20B+ code models practical for local self-hosting.
Devstral Agentic Coding
Devstral Medium scores 46% on SWE-bench Verified — the leading open agentic code model. It can plan, edit, and test multi-file fixes for real GitHub issues.
European Data Residency
Mistral La Plateforme offers EU-hosted inference, making Codestral the natural choice for GDPR-sensitive European teams wanting a code AI.
Cost-Effective Code Chat
At $0.10/1M input tokens, Codestral is competitive with DeepSeek ($0.14/1M) and cheaper than GPT-4o for code Q&A.
Fine-Tuning on Proprietary Code (Research)
LoRA fine-tune on self-hosted weights under MNPL for internal research and testing. Production use requires a commercial licence.
Code Migration & Refactoring
Devstral agentic mode can plan and execute multi-file migrations (e.g., Python 2→3, AngularJS→React) with tool-use.
Automated Test Generation
Devstral can read code, write tests, run them, and iterate — automating the test-generation loop.
CI/CD Code Review
Deploy Codestral as a CI/CD step that reviews PRs and comments on issues at $0.10/1M tokens.
Long-Context Code Chat (Mamba)
Codestral Mamba variant offers 256K context for long-document code chat without the quadratic attention cost.
Educational & Research Use
MNPL permits free use in academia and research, making Codestral suitable for university courses and papers.
Multi-Language Support
80+ programming languages with consistent quality across Python, JS/TS, Java, C++, and Go.
Privacy-Preserving Self-Host
Self-host on your own GPU infrastructure for air-gapped or VPC deployments (MNPL for research; commercial licence for production).
Strengths
- Devstral SWE-bench Leadership — 46% on SWE-bench Verified (Medium), the highest among all models compared, beating Copilot (33%)
- Fast Inference on Consumer Hardware — 22B dense model runs on a single RTX 4090 (24GB) via FP8 quantisation
- Low API Cost — $0.10/1M input tokens, competitive with DeepSeek and cheaper than GPT-4o
- European Data Residency — Mistral La Plateforme offers EU-hosted inference for GDPR-sensitive teams
- Dedicated FIM Endpoint — native prefix/suffix completion API for IDE integration
- 80+ Language Support — broad coverage across mainstream and niche languages
- Mamba Variant — Codestral Mamba offers 256K context with linear attention scaling for long code chat
- Mistral Ecosystem — integrated with Continue, Cursor, and major AI platforms
Limitations & Weaknesses
- MNPL Licence Restriction — production use requires a commercial licence; not as permissive as MIT (DeepSeek) or Apache 2.0 (Qwen)
- Lower HumanEval than Frontier — 81.1% trails DeepSeek (90.2%), Qwen2.5-Coder (92.7%), and Copilot (90.0%) by 9–12 points
- Smaller Context Window — 32K (Codestral) is 4x smaller than DeepSeek and Qwen2.5-Coder (128K); Devstral extends to 256K
- No Fully Open Production Use — unlike DeepSeek (MIT) or Qwen (Apache 2.0), commercial production use requires payment to Mistral
- Weaker on Rust and Niche Languages — 66% HumanEval-X on Rust; long-tail languages lag Python/JS
- Devstral Medium is API-Only — weights not released; cannot self-host the best agentic variant
- Dense Architecture — all 22B params active per token; higher inference cost per token than MoE models like DeepSeek Coder V3 (~3B active)
- Smaller Community than DeepSeek/Qwen — fewer fine-tuning recipes, fewer community integrations
Who Should Use This Model
Best For
- European teams that need GDPR-compliant, EU-hosted code AI with a low API price
- Developers whose primary use case is agentic, multi-file software engineering (Devstral's 46% SWE-bench leads)
- Teams that want to self-host a 20B+ code model on a single consumer GPU (RTX 4090) for research/testing
Not Ideal For
- Teams needing fully open production use without licence fees — use DeepSeek Coder V3 (MIT) or Qwen2.5-Coder (Apache 2.0)
- Those needing the absolute highest HumanEval pass@1 — Qwen2.5-Coder (92.7%) and DeepSeek (90.2%) are stronger
- Teams needing 128K+ context for Codestral specifically — only Devstral extends to 256K; Codestral is 32K
Alternatives, Comparisons & Verdict
Top Alternatives
| Model | HumanEval | SWE-bench | Open Source | Context | Price | Best For |
|---|---|---|---|---|---|---|
| Codestral 22B | 81.1 | — | MNPL (research) | 32K | $0.10/1M | Fast European API |
| Devstral Medium | — | 46.0 | No (API only) | 256K | $0.30/1M | Best agentic SWE-bench |
| GitHub Copilot | 90.0 | 33.0 | No | 128K | $10–39/user/mo | Best IDE integration |
| DeepSeek Coder V3 | 90.2 | 24.0 | Yes (MIT) | 128K | Free / $0.14/1M | Cost + privacy + fine-tuning |
| Qwen2.5-Coder-32B | 92.7 | 23.0 | Yes (Apache 2.0) | 128K | Free | Top open HumanEval |
| StarCoder2-15B | 72.6 | — | Yes (BigCode) | 16K | Free | Lightweight open-source |
Detailed Comparison
Codestral vs DeepSeek Coder V3: DeepSeek wins on HumanEval (90.2 vs 81.1), context window (128K vs 32K), licence (MIT vs MNPL), and inference cost (MoE ~3B active vs 22B dense). Codestral wins on inference speed on consumer hardware (22B FP8 fits on RTX 4090; DeepSeek 33B MoE needs 80GB VRAM) and European data residency. Devstral beats DeepSeek on SWE-bench (46% vs 24%) for agentic tasks. Choose DeepSeek for cost, quality, and open production use; choose Codestral/Devstral for European residency, consumer-GPU self-hosting, and agentic SWE-bench. → See Full Codestral vs DeepSeek Comparison. Codestral vs GitHub Copilot: Copilot wins on HumanEval (90.0 vs 81.1), IDE integration, and enterprise compliance. Codestral wins on cost ($0.10/1M vs $10–39/user/mo), self-hosting, and — via Devstral — agentic SWE-bench (46% vs 33%). Choose Copilot for convenience and compliance; choose Codestral/Devstral for cost, agentic tasks, and European residency.
Our Verdict
Codestral & Devstral occupy a unique niche in 2026: the best agentic code model (Devstral Medium at 46% SWE-bench Verified) and a fast, European, consumer-GPU-hostable completion model. However, the MNPL licence restricts production use, and Codestral's 81.1% HumanEval trails the 90%+ frontier. Choose Devstral for agentic software engineering, Codestral for fast European code completion, or DeepSeek/Qwen2.5-Coder for fully open, higher-quality, lower-cost alternatives.
Internal Links
Frequently Asked Questions
What is the difference between Codestral and Devstral?
Codestral is a 22B code generation model for inline completion and chat (HumanEval 81.1%, 32K context). Devstral is its agentic sibling, fine-tuned for multi-file software engineering tasks with tool-use (file read, edit, shell, tests). Devstral Medium scores 46% on SWE-bench Verified — the highest among all models compared. Codestral is for completion; Devstral is for agentic coding.
What is the Mistral Non-Production License (MNPL)?
MNPL permits research, testing, and non-production use of Codestral weights for free. Production/commercial use requires a commercial licence from Mistral AI. This is more restrictive than MIT (DeepSeek Coder) or Apache 2.0 (Qwen2.5-Coder), which permit unrestricted commercial use. Check Mistral's licence page for current terms.
What is Codestral's HumanEval score?
Codestral 22B scores 81.1% pass@1 on HumanEval. This is solid but trails the 90%+ frontier: DeepSeek Coder V3 (90.2%), Qwen2.5-Coder (92.7%), and GitHub Copilot (90.0%). On MBPP it scores 78.2%.
Can I self-host Codestral on a consumer GPU?
Yes. Codestral 22B in FP8 quantisation requires ~24GB VRAM, fitting on a single RTX 4090 or A10G. With vLLM, this achieves 40–60 tokens/sec. In Q4 quantisation via Ollama, it runs on 32GB of consumer RAM with 2–4% quality loss. This is one of the few 20B+ code models practical for consumer hardware.
How much does the Codestral API cost?
Codestral API costs $0.10 per 1M input tokens and $0.30 per 1M output tokens on Mistral La Plateforme. Devstral Medium costs $0.30/1M input and $0.90/1M output. This is competitive with DeepSeek ($0.14/1M) and cheaper than GPT-4o.
Does Codestral support fill-in-the-middle (FIM)?
Yes. Codestral has a dedicated FIM endpoint (/v1/fim/completions) that accepts prefix and suffix parameters for suffix-aware inline completion. This is the same capability that powers IDE code assistants like Continue and Cursor.
What is Devstral's SWE-bench score?
Devstral Medium scores 46% on SWE-bench Verified, the highest among all models in this comparison — beating GitHub Copilot's agentic mode (33%), DeepSeek Coder V3 (24%), and Qwen2.5-Coder (23%). Devstral Small (22B, open weights under MNPL) scores 40%.
Is Codestral GDPR compliant?
Yes. Mistral La Plateforme offers EU-hosted (France) inference, making Codestral a natural choice for GDPR-sensitive European teams. Data is processed in French data centres. Mistral does not train on API customer data. Self-hosting (under MNPL for research) provides the strongest privacy by keeping data entirely on your infrastructure.
Can I fine-tune Codestral on my own code?
Yes, for research and testing under MNPL. LoRA fine-tuning runs on a single A100 80GB in 6–12 hours. Production use of fine-tuned Codestral requires a commercial licence from Mistral. For fully open fine-tuning without licence restrictions, use DeepSeek Coder V3 (MIT) or Qwen2.5-Coder (Apache 2.0).
Compliance, Ethics & Responsible Use
Data Privacy & Compliance
Mistral La Plateforme offers EU-hosted (France) inference, making Codestral the natural choice for GDPR-sensitive European teams. Data is processed in Mistral's French data centres with GDPR compliance. Mistral does not train on API customer data. Self-hosted Codestral (under MNPL for research) keeps all data on your infrastructure — the most privacy-preserving option. Devstral Medium is API-only, so data flows through Mistral's EU servers. No HIPAA-specific certification is advertised; for healthcare, self-hosting or contacting Mistral for a BAA is the path. SOC 2 status: check with Mistral sales for current certification status. For regulated industries, EU-hosted API + DPA is the baseline; self-hosting is the strongest option.
Ethical Use Guidelines
Primary ethical concerns: (1) MNPL licence ambiguity — the licence permits research but restricts production use, which can create compliance uncertainty for commercial teams; (2) training data provenance — Codestral is trained on public code, raising the same attribution questions as all code models; (3) security — the model can suggest vulnerable code patterns; use SAST tools alongside; (4) agentic risk — Devstral can edit files and run commands autonomously, requiring sandboxing and human review of agentic actions; (5) developer deskilling — over-reliance reduces comprehension. Mistral recommends human review of every suggestion and sandboxing of Devstral agentic workflows.
Commercial Licensing Summary
| Use Case | MNPL (Free) | Commercial Licence | Devstral Medium (API) |
|---|---|---|---|
| Research & testing | Yes | Yes | Yes (API) |
| Personal non-production use | Yes | Yes | Yes (API) |
| Commercial production | No | Yes (paid) | Yes (pay per token) |
| Fine-tuning for production | No (research only) | Yes (with licence) | No (API only) |
| Redistribution of weights | Yes (MNPL terms) | Per licence terms | N/A |
| Enterprise SLA | No | Negotiable | Available |
| EU data residency | Self-managed | Yes (La Plateforme EU) | Yes (La Plateforme EU) |
Enterprise Compliance Checklist
Changelog
| July 2026 | Initial comprehensive guide published. Benchmark scores, API pricing, and feature comparisons updated. |
| Next Update | Quarterly review scheduled — pricing and benchmark scores will be refreshed. |