Class MistralClient

All Implemented Interfaces:
com.tnsai.llm.LLMClient

public class MistralClient extends AbstractOpenAICompatibleClient
Mistral AI LLM client implementation. Provides access to Mistral's models via the API.

Mistral's chat-completions API is OpenAI-compatible at https://api.mistral.ai/v1 — same request/response wire format as DeepSeekClient / GroqClient — so this client is a thin subclass of AbstractOpenAICompatibleClient with no behavioural overrides.

Supported models:

  • mistral-large-latest - Top-tier reasoning model
  • pixtral-large-latest - Multimodal model
  • ministral-8b-latest - Efficient edge model
  • codestral-latest - Specialized for code generation

Configuration via environment variables:

  • MISTRAL_API_KEY - Required API key for authentication
  • MISTRAL_BASE_URL - Optional, defaults to https://api.mistral.ai/v1
See Also:
  • Constructor Details

    • MistralClient

      public MistralClient(String model)
    • MistralClient

      public MistralClient(String model, float temperature)
    • MistralClient

      public MistralClient(String model, float temperature, Integer maxTokens)
    • MistralClient

      public MistralClient(String model, float temperature, Float topP, Integer maxTokens)
    • MistralClient

      public MistralClient(String baseUrl, String model, float temperature, Integer maxTokens, String apiKey)
    • MistralClient

      public MistralClient(String baseUrl, String model, float temperature, Float topP, Integer maxTokens, String apiKey)