Codestral
Code generation model Generally available Open WeightsMistral AI's 22B code-specialized model trained on 80+ programming languages, supporting fill-in-the-middle code completion and a 32k context window.
Overview
Codestral (snapshot `codestral-2405`) is Mistral AI's first code-specialized language model introduced in May 2024. Built with 22 billion parameters, Codestral is optimized specifically for software development, code generation, bug fixing, and test writing across more than 80 programming languages.
Codestral features a 32,768-token (32k) context window and supports fill-in-the-middle (FIM) code completion tasks natively. It exhibits high fluency in Python, Java, C++, C#, JavaScript, TypeScript, Swift, Go, and SQL.
The model is accessible via Mistral's hosted API (`codestral-2405` at $0.20 / 1M input tokens, $0.60 / 1M output tokens) and dedicated IDE plugins. Open weights are downloadable under the Mistral Non-Commercial License for developer evaluation.
Technical Specifications
Context Window
32,768 tokens
Max Input Tokens
32,000
Max Output Tokens
8,192
Parameters
22.0B
Released
2025-01-17
Modalities
Text → Text (Both)
Capabilities
Text Generation
Code Generation
Function Calling
Use Cases
Coding Assistance
Code Review
Languages
English (en)
Access Routes
| Route | Type | Protocol | Region / Scope | Provider | Status |
|---|---|---|---|---|---|
| Mistral AI | Hosted API (Direct provider) | Mistral REST API | Global | Mistral AI | Available |
Provider
Identifiers
- codestral-latest Canonical identifier Default
- codestral-2405 Canonical identifier Default