Codestral
Mistral AI
DISCONTINUED. Mistral AI's first code-specialized open-weight model with 22B parameters. Released May 2024, designed explicitly for code generation tasks including function completion, test writing, and fill-in-the-middle code completion. Trained on diverse dataset of 80+ programming languages (Python, Java, C, C++, JavaScript, Bash, Swift, Fortran, etc.). Features 32K context window - larger than competitors' 4K-16K. Licensed under Mistral AI Non-Production License for research/testing; commercial licenses available on demand. Helps developers write and interact with code through unified instruction and completion API. Mistral deprecated the 24.05 hosted model on December 2, 2024 and retired it on June 16, 2025; a current Codestral (v25.08) exists under Mistral's Premier licence, so this record covers the retired original.
Strengths
- Specialized for code generation - trained on 80+ programming languages
- 32K context window larger than competitors (4K-16K typical)
- Fill-in-the-middle capability for inline code completion
- Unified API for both instruction-following and code completion
- Covers both popular (Python, Java, JavaScript) and niche (Swift, Fortran) languages
- Test generation capabilities improve development workflow
- Open weights enable customization and self-hosting
Caveats
- DISCONTINUED - Mistral retired the codestral-2405 version on June 16, 2025
- A current Codestral exists under Mistral's Premier licence and is a separate model
- Non-Production License limits use cases (commercial licenses required)
- 22B size requires GPU for optimal performance
- 4K max output tokens standard for the size class
- Not ideal for general-purpose tasks - code-specialized
- Commercial licensing terms not publicly detailed
- Vendor
- Mistral AI
- Context Window
- 32,000 tokens
- Max Output
- 4,096 tokens
- License
- Mistral AI Non-Production License
- Release Date
- 2024-05-29
- Modalities
- text
Capabilities
Resources
Pricing
Open weights (Non-Production License). Commercial licenses on demand. API pricing varies by provider