Codestral Embed
Codestral Embed turns code into vectors for search and similarity comparison. It is a retrieval model, rather than a code generator. Mistral exposes the May 2025 release through the embeddings API and batch processing.
Choose vector length and precision
The output dimensions are ordered by relevance. Mistral says a client can retain the first n dimensions to trade retrieval quality for storage. The release also supports different precisions. These controls change the search representation, rather than the text that a code model generates.Codestral Embed dimensions and retrieval guidance
Index useful pieces of code
Mistral recommends starting with chunks of 3,000 characters and 1,000 characters of overlap. It identifies larger chunks as a possible cause of poorer retrieval. The recommendation is a starting point for evaluation, not a universal best size.Codestral Embed dimensions and retrieval guidance
Check whether search finds the needed file
Practical guidance. Use questions based on real changes, then inspect which functions and files the index retrieves. Compare storage savings with retrieval failures before shortening vectors. A coding assistant can generate a plausible edit from the wrong context, so retrieval quality needs its own measurement.
Specifications & access
| Detail | Value and conditions |
|---|---|
| Launch date | |
| Access | API |
| Model identifiers | codestral-embed-2505 |
| Context window | 8,192 tokens Maximum input context given in the release article; shorter chunks are recommended for retrieval. Codestral Embed dimensions and retrieval guidance |
| API identifier | codestral-embed-2505Codestral Embed API model page |
| Initial release stage | General availability.Codestral Embed API model page |
| Deployment | Hosted API; on-premises deployment by arrangementCodestral Embed dimensions and retrieval guidance |
Related models
- Mistral Embed
Mistral AI · Mistral Embed
A text embedding model that produces fixed 1,024-dimensional vectors for search and classification.
Launch date not confirmedAPI - Codestral 2508
Mistral AI · Codestral
A coding model optimized for frequent editor completions and fill-in-the-middle requests.
Launch date API