Codestral is Mistral AI’s dedicated code generation model, first released in May 2024 with 22 billion parameters. It’s built for fill-in-the-middle completion and multi-language code generation, and it launched with an 81.1 percent pass@1 score on HumanEval, ahead of larger code models like Code Llama 70B and DeepSeek Coder 33B at the time. The original release used a 32,000-token context window and shipped under the Mistral AI Non-Production License, which limited free use to research and testing and required a separate commercial license for production deployment.
Mistral later extended Codestral’s context window to 256,000 tokens and, in April 2026, relicensed the model under Apache 2.0, removing the earlier commercial-use restriction and making it freely usable in IDEs, coding assistants, and CI pipelines. Codestral is available both as downloadable weights on Hugging Face and through Mistral’s API, currently priced at $0.30 per million input tokens and $0.90 per million output tokens. It competes directly with other mid-size open code models such as Codestral Mamba and Code Llama, and its move to a permissive license was widely seen as a significant shift in the open-source coding model space.