Mistral
Configure Mistral as a custom endpoint in LibreChat.
Mistral provides its own family of chat and embedding models, used in LibreChat as a custom endpoint.
Get an API key
Create a key from the Mistral console. Add it to your .env file:
MISTRAL_API_KEY=your-api-keyConfiguration
Add the endpoint under endpoints.custom in your librechat.yaml:
- name: "Mistral"
apiKey: "${MISTRAL_API_KEY}"
baseURL: "https://api.mistral.ai/v1"
models:
default: ["mistral-tiny", "mistral-small", "mistral-medium", "mistral-large-latest"]
fetch: true
titleConvo: true
titleModel: "mistral-tiny"
modelDisplayLabel: "Mistral"
dropParams: ["stop", "user", "frequency_penalty", "presence_penalty"]Notes
- The Mistral API only allows a system message at the top of the messages payload.
- The API is strict with unrecognized parameters and its errors are not descriptive (often just "no body"). Using
dropParamsto dropuser,frequency_penalty, andpresence_penaltyis required. stopis no longer a default parameter, so it does not need to be indropParamsunless you want to prevent users from configuring it.- Fetching the model list is supported, but be careful not to select embedding models for chat.
How is this guide?