Mistral AI has introduced Codestral, its first open-weight generative AI model explicitly designed for code generation tasks. The 22B-parameter model is trained on a diverse dataset of over 80 programming languages and features a 32k context window.

  • Codestral supports fill-in-the-middle (FIM) mechanisms to complete partial code, write tests, and generate functions across languages like Python, Java, C++, and JavaScript.
  • It outperforms competitors in RepoBench, a long-range evaluation for code generation, leveraging its larger context window compared to models with 4k, 8k, or 16k limits.
  • The model is available under the Mistral AI Non-Production License for research and testing, with commercial licenses available on demand.
  • Codestral can be accessed via a dedicated beta endpoint at codestral.mistral.ai or the standard api.mistral.ai endpoint.
  • Integrations are available through LlamaIndex, LangChain, Continue.dev, and Tabnine for IDEs like VSCode and JetBrains.

The release aims to provide developers with a fast, high-quality tool for code generation and autocomplete, reducing latency while maintaining performance comparable to larger models.