Class MistralAiProvider

All Implemented Interfaces:
PropertyChangeSource, Rebindable

public class MistralAiProvider extends OpenAiChatCompletionsProvider
Dedicated AI Provider for Mistral AI using their native OpenAI-compatible API.

This provider parses rich capability flags, FIM endpoints, reasoning tags, and context lengths directly from Mistral's /v1/models JSON endpoint.

Author:
anahata
  • Constructor Details

    • MistralAiProvider

      public MistralAiProvider()
      Constructs a new Mistral AI provider with stable UUID "Mistral".
  • Method Details

    • createModel

      protected OpenAiCompatibleModel createModel(com.fasterxml.jackson.databind.JsonNode node)
      Constructs a concrete model instance for this provider.

      Creates a specialized MistralModel that parses capabilities, context lengths, and FIM endpoints.

      Overrides:
      createModel in class OpenAiChatCompletionsProvider
      Parameters:
      node - The JSON node containing model metadata.
      Returns:
      A new model instance.
    • getApiKeyHint

      public String getApiKeyHint()
      Gets a template or hint string to display when the API keys file is empty.

      Implementation details: Provides a standard header hint for the multi-key configuration file.

      Provides the Mistral-specific key hint for the api_keys.txt configuration file.

      Overrides:
      getApiKeyHint in class OpenAiChatCompletionsProvider
      Returns:
      The API key hint text.