Announced May 29, 2024, Mistral Codestral was the first model Mistral AI dedicated entirely to code. With 22 billion parameters and training across more than 80 programming languages, including Python, Java, C, C++, JavaScript, Bash, Swift, and Fortran, Mistral Codestral covers the breadth of languages developers encounter in production.
Mistral Codestral's defining technical feature is fill-in-the-middle (FIM) support. Unlike instruction-only models that generate code from a prompt, FIM lets Mistral Codestral complete code within a partial snippet. Mistral Codestral can insert a function body, finish a conditional branch, or complete a class method given the surrounding context. This makes Mistral Codestral a natural fit for IDE integrations like Continue.dev and Tabnine, where code above and below the cursor is provided as context.
Beyond completion, Mistral Codestral handles test generation and documentation authoring. Its context window of 128K tokens was over four times larger than those of competing models at launch, so Mistral Codestral can process full files rather than truncated snippets.