Chat route with Mistralv3.8+

Configure a chat route using the Mistral Tiny model with the OpenAI format.

Prerequisites

  • Mistral account

Environment variables

  • MISTRAL_API_KEY: The API key to use to connect to Mistral.

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: ai-proxy-advanced
    config:
      targets:
      - route_type: llm/v1/chat
        auth:
          header_name: Authorization
          header_value: Bearer ${{ env "DECK_MISTRAL_API_KEY" }}
        model:
          provider: mistral
          name: mistral-tiny
          options:
            mistral_format: openai
            upstream_url: https://api.mistral.ai/v1/chat/completions
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!