News
ReleasesOVHcloud unveils Olala mini, its first in-house LLMChinaA 9B model beats a 1T model on FinQA, trained with Crusoe Managed RLReleasesThe internal metaphysics of an LLMReleasesMapping Language Model Internal Representations to Physical Laws and Scientific ReasoningResearchCan China keep rogue AI in check? Meet the start-up testing the top modelsFrontierMicrosoft aims to challenge OpenAI, Anthropic with cheaper, specialized AI modelsOpen modelsMicrosoft rolls out new first-party models and updates to agentic AI continuous improvementFrontierMicrosoft unveils AI models for coding, cybersecurity as it takes on Anthropic, OpenAIFrontierGoogle is making it easier to opt out of Gemini AI model training – here’s howFrontierOpenAI Unveils New Astra AI Model After Scrapping Prior ReleaseReleasesOVHcloud unveils Olala mini, its first in-house LLMChinaA 9B model beats a 1T model on FinQA, trained with Crusoe Managed RLReleasesThe internal metaphysics of an LLMReleasesMapping Language Model Internal Representations to Physical Laws and Scientific ReasoningResearchCan China keep rogue AI in check? Meet the start-up testing the top modelsFrontierMicrosoft aims to challenge OpenAI, Anthropic with cheaper, specialized AI modelsOpen modelsMicrosoft rolls out new first-party models and updates to agentic AI continuous improvementFrontierMicrosoft unveils AI models for coding, cybersecurity as it takes on Anthropic, OpenAIFrontierGoogle is making it easier to opt out of Gemini AI model training – here’s howFrontierOpenAI Unveils New Astra AI Model After Scrapping Prior Release
EveryLLM
fnCodestral

Codestral

Mistral AI's 22B open-weight model built for code generation across 80+ languages

Codestral is an open-weight generative model from Mistral AI, designed specifically for code generation and trained on more than 80 programming languages. Released as a 22B model with a 32k context window, it supports completion, tests and fill-in-the-middle coding, and is offered through Mistral's API and developer tools.

Share on WhatsApp

  • Mistral AI's first code model, with 22B parameters
  • Trained on more than 80 programming languages
  • 32k context window for long-range code completion
  • Fill-in-the-middle support for inserting missing code
  • Open weights under a non-production licence, commercial terms on request

What it is

Codestral is Mistral AI's first model made specifically for writing and working with code. It is an open-weight generative model with 22 billion parameters, trained on more than 80 programming languages, from widely used ones such as Python, Java, C, C++, JavaScript and Bash to more specialised ones like Swift and Fortran. The model handles function completion, test writing and filling in missing parts of code, and it also understands English, so developers can build coding assistants around it. Mistral AI positions it as a fast option for code generation with a 32k context window.

How it came about

Codestral is described by Mistral AI as its first code model. It was released alongside a dedicated API endpoint, codestral.mistral.ai, offered free during an eight-week beta behind a waitlist, and made available on the standard api.mistral.ai endpoint and for self-deployment. Integrations with Continue.dev, Tabnine, LlamaIndex, LangChain and JetBrains tools were announced at the same time.

Inside the model

The model has 22 billion parameters and a 32k context window, larger than the 4k, 8k or 16k windows Mistral AI attributes to competing code models. It was trained on a dataset covering more than 80 programming languages and supports a fill-in-the-middle mechanism, letting it insert code between existing pieces rather than only appending. Mistral AI says it masters both code and English, and it can be used through shared instruction and completion endpoints.

What it can do

Mistral AI reports results on Python benchmarks including HumanEval pass@1, MBPP sanitised pass@1, CruxEval for output prediction and RepoBench EM for repository-level completion, plus Spider for SQL and HumanEval pass@1 across C++, bash, Java, PHP, TypeScript and C#. Fill-in-the-middle was tested in Python, JavaScript and Java against DeepSeek Coder 33B. A JetBrains researcher reported a Kotlin-HumanEval pass rate of 73.75 at T=0.2, above GPT-4-Turbo's 72.05 and GPT-3.5-Turbo's 54.66.

How to use it

Weights can be downloaded from HuggingFace under the Mistral AI Non-Production License, which permits research and testing; commercial licences are available on request. The model is also served at codestral.mistral.ai for IDE use and at api.mistral.ai with per-token billing, and it can be self-deployed. Integrations include Continue.dev, Tabnine, LlamaIndex and LangChain.

Reception and debate

Partners welcomed the release. Continue.dev's Nate Sesti said a public autocomplete model combining this speed and quality had not existed before. Tabnine's R&D lead praised its performance relative to larger models, while Sourcegraph's CEO said internal evaluations showed lower autocomplete latency without losing suggestion quality. LlamaIndex and LangChain founders reported accurate code generation and working tool use.

Why it matters

Codestral marked Mistral AI's entry into code-focused models and was quickly wired into popular developer tools and agent frameworks. Mistral AI claims it set a new standard for the performance and latency trade-off in code generation among models with lower hardware requirements, and its 32k window was presented as an advantage for long-range repository work.

Questions people ask about Codestral

What is Codestral for?

It is a code generation model from Mistral AI. It completes functions, writes tests, fills in missing code and supports chat-style coding help across more than 80 programming languages, including Python, Java, JavaScript and Bash.

How large is it and how much code can it look at?

Codestral has 22 billion parameters and a 32k token context window. Mistral AI says that window is larger than those of competing code models it compared against, which had 4k, 8k or 16k.

Can I use it commercially?

The downloadable weights come under the Mistral AI Non-Production License, allowing research and testing. Mistral AI says commercial licences are available on request, and the model is also reachable through its paid API.

How do developers run it?

Options include downloading weights from HuggingFace, calling the codestral.mistral.ai endpoint for IDE work, using api.mistral.ai with per-token billing, or self-deployment. Plugins such as Continue.dev and Tabnine expose it inside editors.

Good reading and sources

    Where this page comes from

    There is no English Wikipedia article on Codestral yet, so the facts on this page come from the sources listed above: mistral.ai/news/codestral. Some are the subject's own pages, so its claims about itself are reported as its claims. EveryLLM wrote the text in its own words, with AI assistance, and compares it with the sources to make sure no passage is copied.

    It may contain mistakes, and figures change over time. Nothing here is investment or buying advice. If something is wrong, tell us. Last refreshed 2026-11-14.

    The weekly digest

    Every Monday: the model of the day, new pages on EveryLLM, and the conferences and anniversaries of the week ahead.