Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

Mistral

Configure Mistral as a custom endpoint in LibreChat.

Archived documentation

You are reading the frozen documentation for v0.8.7, which is no longer maintained. Go to the latest docs.

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-key

Configuration

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 dropParams to drop user, frequency_penalty, and presence_penalty is required.
  • stop is no longer a default parameter, so it does not need to be in dropParams unless you want to prevent users from configuring it.
  • Fetching the model list is supported, but be careful not to select embedding models for chat.