Codestral 2 (Mistral) logo
B

Codestral 2 (Mistral)

B Tier · 7.5/10

Mistral's dedicated code model -- Codestral 2 (launched 2026-04-08) relicensed under Apache 2.0, removing the commercial-use restrictions of the original. 22B dense, strong FIM (fill-in-middle), available via Mistral API + Hugging Face

Last updated: 2026-04-18Free tier available

Score Breakdown

6.0
Ease of Use
8.0
Output Quality
9.0
Value
7.0
Features

The Good and the Bad

What we like

  • +Relicensing to Apache 2.0 is the real news -- the original Codestral required a Mistral Non-Production license for any commercial use, which blocked adoption in-product. Codestral 2 is immediately usable in commercial IDEs, coding assistants, and CI tooling
  • +FIM (fill-in-middle) performance is class-leading for open models -- purpose-built for IDE autocomplete in a way that general-purpose models (Llama, DeepSeek V3) aren't. Competitive with GitHub Copilot's underlying model for inline completions
  • +22B dense (not MoE) means predictable VRAM requirements and throughput -- easier to deploy than DeepSeek's 671B MoE or Qwen's sparse 35B-A3B for teams that want certainty
  • +Available via Mistral's EU-hosted API for customers who need GDPR-native inference -- rare combination of 'open weights + EU vendor' in the code-model category

What could be better

  • 22B parameters put it behind frontier closed models (Claude Opus 4.7, GPT-5.4, Gemini 3.1 Pro) on complex multi-file reasoning and agentic coding. This is a fast, cheap inline-completion model, not a frontier coding agent
  • No multimodal or tool-use baked in -- if your workflow needs screenshot-to-code or terminal tool execution, Claude Code, Cursor Composer 2, or Devin cover that ground better
  • Benchmark transparency could be stronger -- Mistral publishes MBPP / HumanEval numbers but third-party SWE-bench or LiveCodeBench verification is thinner than for DeepSeek, Qwen Coder, or the frontier models
  • SWE-bench Verified performance trails the top open-weight coding specialists (Qwen Coder 3.5, DeepSeek V3 Coder variants) by several points in independent testing

Pricing

Open weights (Apache 2.0)

$0
  • 22B dense model on Hugging Face
  • Commercial use allowed (new in Codestral 2; original Codestral required Mistral Non-Production license)
  • Self-host on your own infrastructure
  • Fine-tune without license fees

Mistral La Plateforme (hosted API)

$0.30 / $0.90/per 1M tokens (input/output)
  • Pay-as-you-go API access
  • FIM (fill-in-middle) endpoint for IDE autocomplete
  • Chat + completion endpoints
  • Consistent with Mistral Small/Medium tier pricing

Self-hosted (Hardware)

Hardware only
  • Min: 48 GB VRAM (1x RTX 6000 Ada or 2x RTX 3090 with tensor parallelism)
  • Mid: 1x H100 80GB for production throughput
  • Max: 2x H100 for batched serving + low latency
  • Quantized (GGUF Q4_K_M) runs on a 24GB card for experimentation

System Requirements

Hardware needed to self-host. Min = smallest viable setup (usually heavy quantization). Max = full-precision / production-grade.

Model variantMinMax
Codestral 2 22B dense (Apache 2.0)Apache 2.0 commercial use OK. Original Codestral (2024) still under Mistral Non-Production License -- verify you are on Codestral 2.48 GB VRAM -- 1x RTX 6000 Ada or 2x RTX 3090 tensor parallel (or quantized GGUF Q4_K_M on a 24GB card)1x H100 80GB for production FP16 throughput; 2x H100 for batched serving

Known Issues

  • Codestral 2 is Apache 2.0, but the ORIGINAL Codestral (2024) is still under Mistral Non-Production License -- if you pulled older weights before 2026-04-08, verify you're on Codestral 2 before shipping commercial useSource: Mistral release notes · 2026-04
  • EU-hosted API infrastructure can have higher latency than US-based DeepSeek or GitHub Copilot backends for North American developersSource: Developer reports on Mistral Discord · 2026-04

Best for

Developers and teams who want a legally-clean open-weights code model they can self-host OR hit via API, particularly those with EU data-residency requirements. Ideal for building in-house IDE extensions, code-review bots, or CI/CD AI integrations where the Apache 2.0 license removes procurement friction.

Not for

Developers who want frontier-quality agentic coding -- Cursor Composer 2, Claude Code, or Devin will outperform on complex multi-file tasks. Also not ideal if you only need hosted inference and don't care about self-hosting -- DeepSeek V3.2 and Qwen3.6-Plus offer stronger benchmarks at competitive pricing.

Our Verdict

Codestral 2's Apache 2.0 relicensing is the biggest licensing unlock in open-source coding models since Meta released Llama 2 commercially. The model itself is solid-not-frontier (22B dense, fast, predictable), but the license change is what matters -- teams that couldn't touch the original Codestral because of commercial restrictions can now ship it in products. For IDE-style inline autocomplete on owned infrastructure, or for EU-data-residency use cases, this is now a first-tier option. For agentic or frontier coding work, keep using Claude Opus 4.7 via Claude Code or Composer 2 in Cursor.

Sources

  • Mistral news (accessed 2026-04-18)
  • ReleaseBot: Mistral updates (accessed 2026-04-18)
  • fazm.ai: April 2026 open model releases (accessed 2026-04-18)

Alternatives to Codestral 2 (Mistral)

GitHub Copilot logo

GitHub Copilot

AI code assistant that lives in your editor -- autocomplete on steroids

A
8.3/10
Free tierFrom $0
Inline code completions feel magical -- ...Works directly in VS Code, JetBrains, Ne...
Updated 2026-04-18
Cursor logo

Cursor

AI-native code editor, now agent-first in Cursor 3 -- multi-workspace, cross-platform agents, and Composer 2 (Cursor's own 200+ tok/s coding model)

A
8.3/10
Free tierFrom $0
Cursor 3's agent-first redesign (April 2...Composer 2 is Cursor's own frontier codi...
Updated 2026-04-18
Windsurf logo

Windsurf

Cognition's AI code editor -- Windsurf 2.0 (launched 2026-04-15) adds Agent Command Center, Spaces, and embedded Devin cloud agents. Directly competitive with Cursor 3

B
7.5/10
Free tierFrom $0
Windsurf 2.0 (launched 2026-04-15) is a ...Embedded Devin cloud agent (via Cognitio...
Updated 2026-04-17
Tabnine logo

Tabnine

AI code completion that runs locally and keeps your code private -- the enterprise-friendly alternative to Copilot

C
6.3/10
Free tierFrom $0
Privacy-first approach -- code never lea...Works as a plugin in any major IDE (VS C...
Updated 2026-03-27
Claude Code logo

Claude Code

Anthropic's terminal-based coding agent that reads your whole repo and makes real changes -- not just suggestions

B
7.8/10
From $20
Reads and understands your entire codeba...Actually executes code, runs tests, and ...
Updated 2026-03-31
Lovable logo

Lovable

Describe the app you want in plain English and watch it build itself -- 8M users and $400M+ ARR say it works

B
7.8/10
Free tierFrom $0
The ease of use is unmatched -- describe...Built-in Supabase integration means you ...
Updated 2026-03-31
Devin logo

Devin

The most autonomous AI coding agent -- Devin 2.2 (Feb 24 2026) adds desktop/GUI testing (Figma, browser automation), Devin Review (pull-request analysis catching ~30% more issues), and ~3x faster startup (~15s vs ~45s). Now embedded in Windsurf 2.0

B
7.4/10
From $20
Genuine autonomy -- you can describe a t...Desktop / GUI testing via computer-use (...
Updated 2026-04-17
Replit logo

Replit

Cloud IDE with an AI agent that can build full apps from prompts -- coding optional, but recommended

B
7.0/10
Free tierFrom $0
Zero setup -- open a browser, describe y...Full development environment in the clou...
Updated 2026-04-02
Codex (OpenAI) logo

Codex (OpenAI)

OpenAI's cloud-based coding agent -- runs parallel tasks, proposes PRs, and lives inside ChatGPT

A
8.3/10
Free tierFrom $0
Lives inside ChatGPT -- if you already p...Parallel task execution is a real differ...
Updated 2026-04-17
Google Antigravity logo

Google Antigravity

Google's agent-first AI IDE -- deploys up to 5 autonomous coding agents in parallel on a VS Code fork

A
8.0/10
Free tierFrom $0
Up to 5 autonomous agents working in par...Mission Control Manager View lets you di...
Updated 2026-04-14