itzmekhokan/ai-provider-for-mistral

AI Provider for Mistral for the PHP AI Client SDK. Works as both a Composer package and WordPress plugin.

Maintainers

Package info

github.com/itzmekhokan/ai-provider-for-mistral

pkg:composer/itzmekhokan/ai-provider-for-mistral

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2026-06-20 16:30 UTC

This package is auto-updated.

Last update: 2026-07-05 11:49:30 UTC


README

AI Provider for Mistral for the WordPress AI Client. Works as both a Composer package and a WordPress plugin.

This provider registers Mistral with the AI Client, exposing Mistral's models (Mistral Large, Medium, Small, the Ministral and Magistral families, and the vision-capable Pixtral models) for text generation through Mistral's OpenAI-compatible Chat Completions API.

Requirements

How it works

Mistral exposes an OpenAI-compatible API, so this provider is intentionally thin:

Class Responsibility
Provider\MistralProvider Registers the provider, base URL (https://api.mistral.ai/v1), API-key auth, and metadata.
Metadata\MistralModelMetadataDirectory Lists models from GET /v1/models and maps capabilities/options.
Models\MistralTextGenerationModel Sends POST /v1/chat/completions via the shared OpenAI-compatible base class.

Because Mistral speaks the Chat Completions format, MistralTextGenerationModel extends AbstractOpenAiCompatibleTextGenerationModel from the SDK and only overrides request construction.

Supported capabilities

  • Text generation (chat) with the Mistral model family
  • Multimodal (image) input for vision-capable models (e.g. Pixtral)
  • Function calling and JSON / structured output

Mistral also serves embeddings, moderation, and OCR models; these are listed without text generation capability since they are not chat models.

Installation

As a WordPress plugin

Copy this directory into wp-content/plugins/ and activate it alongside the WordPress AI Client.

As a Composer package

composer require itzmekhokan/ai-provider-for-mistral

Author

Khokan Sardar

License

GPL-2.0-or-later