Skip to main content

Mistral

info

You can get an API key from the Mistral Dashboard. Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai). If you are using a Codestral API key, you should set the apiBase to https://codestral.mistral.ai/v1. Otherwise, we will default to using https://api.mistral.ai/v1.

Chat model

We recommend configuring Mistral Large as your chat model.

config.yaml
models:
- name: Mistral Large
provider: mistral
model: mistral-large-latest
apiKey: <YOUR_MISTRAL_API_KEY>
roles:
- chat

Autocomplete model

We recommend configuring Codestral as your autocomplete model.

config.yaml
models:
- name: Codestral
provider: mistral
model: codestral-latest
# apiBase: https://codestral.mistral.ai/v1 # Do this if you are using a Codestral API key
roles:
- autocomplete

Embeddings model

We recommend configuring Mistral Embed as your embeddings model.

config.yaml
models:
- name: Mistral Embed
provider: mistral
model: mistral-embed
apiKey: <YOUR_MISTRAL_API_KEY>
apiBase: https://api.mistral.ai/v1
roles:
- embed

Reranking model

Mistral currently does not offer any reranking models.

Click here to see a list of reranking model providers.