CODESTRAL
Built for code generation across 80+ programming languages. 256K context. $0.30/$0.90 per million tokens. A focused alternative to Claude Sonnet 4.6 for code-heavy workloads.
Codestral is Mistral's purpose-built coding model. It's tuned exclusively on a code-heavy mix with strong coverage across 80+ programming languages — including Rust, Go, Swift, Kotlin, Solidity, and more obscure targets where general-purpose models sometimes stumble. The 256K context window is large enough to load a substantial slice of a codebase in a single call. Priced at $0.30 per million input tokens and $0.90 per million output, it's an order of magnitude cheaper than Claude Opus 4.7 for code work, and roughly 1/3 the cost of Claude Sonnet 4.6. The case for: high-throughput code generation, fill-in-the-middle (FIM) autocomplete, language coverage past JavaScript/Python/TypeScript, and pair-with-Claude councils where you want a code-specialist second opinion. The case against: SWE-bench refactor leadership still belongs to Claude Opus 4.7, and Codestral does not accept image input — no screenshot-to-code workflows.
A solid coding council is Codestral + Claude Sonnet 4.6 + GPT-5.5. Codestral provides a code-specialist viewpoint at low cost, Sonnet 4.6 brings near-Opus quality at 1/5 the price, and GPT-5.5 contributes tool-calling stability if the workflow eventually needs to execute. The synthesizer reconciles disagreements, which is most valuable when one of the three has caught a bug the others missed.
On SWE-bench, no — Sonnet 4.6 (and Opus 4.7 above it) lead. But Codestral is materially cheaper, covers more niche languages, and is purpose-built for FIM. For high-volume code work where 90% quality at 1/3 the price is fine, Codestral wins.
80+ programming languages, including the major ones (Python, JavaScript, TypeScript, Java, C, C++, Go, Rust) and a long tail of niche targets like Solidity, Fortran, COBOL, and Elixir.
No — text only. For screenshot-to-code, use Mistral Large 3 or a Gemini variant in parallel.
A training objective where the model is given a code prefix and suffix and asked to generate the middle. It's the right setup for autocomplete and IDE integrations, and Codestral was trained on it explicitly.
$0.30 per million input tokens and $0.90 per million output. Council AI bundles it inside monthly plan budgets.
No — pick Mistral Small 4 or Medium 3.5 for general work. Codestral's tuning trades general-purpose quality for code specialization.