Mistral Common is Mistral AI’s official open-source inference library for pre-processing Mistral models, with 952 stars on GitHub and updates landing daily.
Mistral Common is the set of tools Mistral AI open-sources to help developers work correctly with its models. It contains the official tokenizers plus the validation and normalization code used with Mistral models, so what you feed the model matches exactly what the model expects. The library handles tokenization of text, images and tool calls, and validates and normalizes requests, messages, tool calls and responses on top of Pydantic. Tokenizers are versioned to guarantee backward compatibility with each released model, which removes a whole class of subtle bugs that appear when people hand-roll preprocessing for a model family that evolves quickly. The library follows the same code paths Mistral uses for its own endpoints, so behaviour you test locally matches what the official API expects, including chat templating and message formatting details that are easy to get subtly wrong when reimplemented by hand.
Mistral Common is free and open source under the Apache-2.0 license. There are no fees or tiers for the library itself; you only need access to Mistral models, whether through Mistral’s API or your own deployment.
Mistral Common is for developers building applications on Mistral models โ whether calling the hosted API or self-hosting open weights โ who want tokenization and request formatting to be exactly right. It is also useful for teams building their own tooling around Mistral models who prefer the vendor’s reference implementation over guesswork.