Overview
The Mistral provider gives you access to Mistral AI’s models for chat completion and embeddings, optimized for European languages and multilingual tasks.Installation
createMistral()
Create a Mistral provider instance.Options
Your Mistral API key. Defaults to
MISTRAL_API_KEY environment variable.Custom base URL for API requests.
Provide your own configured Mistral client instance.
Returns
MistralProvider with methods chatModel() and embeddingModel().
Supported models
Chat models
Large Models
Large Models
- mistral-large-2512 - Latest flagship model (Mistral Large 3)
- mistral-large-2407 - Previous generation flagship
Medium Models
Medium Models
- mistral-medium-2508 - Strong performance at lower cost (Mistral Medium 3.1) - magistral-medium-latest - Reasoning-capable Magistral model
Small Models
Small Models
- mistral-small-2506 - Balanced small model - mistral-small - Quick responses - mistral-tiny - Ultra-fast, lightweight
Specialized Models
Specialized Models
- codestral - Optimized for code generation
- mixtral-8x7b - Mixture of experts architecture
- mixtral-8x22b - Larger mixture of experts
Embedding models
- mistral-embed - High-quality text embeddings
Capabilities
| Feature | Support |
|---|---|
| Chat Completion | Yes |
| Streaming | Yes |
| Function Calling | Yes |
| Vision | Yes |
| Reasoning | Output only |
| Embeddings | Yes |
| Image Generation | No |
Mistral can return reasoning content from thinking-capable models, but it
does not map
reasoning.effort into the request. The reasoning option is
accepted as a no-op. ChatModel.capabilities.reasoning.supported and
getMistralModelCapabilities(modelId) both report supported: false with
an empty effort list.Examples
Basic chat
Streaming
Reasoning output
reasoning.effort is not sent to the Mistral API. Thinking-capable models
decide their own reasoning behavior and the adapter extracts the resulting
reasoning parts.Tool calling
Embeddings
Batch embeddings
Code generation
Provider-specific options
Options are namespaced undermistral in providerOptions:
Generate options
stopSequences, frequencyPenalty, presencePenalty, randomSeed, parallelToolCalls, promptMode, safePrompt.
Embed options
outputDtype ('float' | 'int8' | 'uint8' | 'binary' | 'ubinary'), encodingFormat ('float' | 'base64'), metadata.
Error handling
Related
OpenAI Provider
GPT models with reasoning effort control
Anthropic Provider
Claude models with extended thinking
Embeddings Guide
Learn how to use embeddings