100+
October 26, 2026
March 23, 2026
This plugin provides a third-party Mistral integration for the PHP AI Client SDK. It enables WordPress sites to use Mistral models for text generation and related AI capabilities.
It is not affiliated with, endorsed by, or sponsored by Mistral AI.
Features:
Available models are dynamically discovered from the Mistral API.
Requirements:
ai_provider_for_mistral_model_sort_callback
Filters the comparator used to order Mistral models in the metadata directory. Return any callable with the usort() signature function (ModelMetadata $a, ModelMetadata $b): int. The default comparator, the directory instance, and the unsorted model list are passed as context, so your filter can delegate to the default for everything except the cases you want to override.
Example — pin codestral-latest to the top and fall back to the default order for everything else:
add_filter(
'ai_provider_for_mistral_model_sort_callback',
function ( callable $default ): callable {
return function ( $a, $b ) use ( $default ) {
if ( $a->getId() === 'codestral-latest' ) return -1;
if ( $b->getId() === 'codestral-latest' ) return 1;
return $default( $a, $b );
};
}
);
ai_provider_for_mistral_default_voice_id
Filters the voice used for text-to-speech when no voice is set with asOutputSpeechVoice(). Defaults to the English preset voice voice_478 for Voxtral TTS 3 models and gb_jane_neutral for older models. The model ID is passed as the second argument.
ai_provider_for_mistral_tts_max_text_length
Filters the maximum number of characters narrated in a single text-to-speech request (default 2000). Longer text is split at paragraph and sentence boundaries and the audio joined into one file, which requires the MP3 or PCM format. The model ID is passed as the second argument.
This plugin connects to the Mistral AI API (https://api.mistral.ai/v1) to provide AI text generation, image generation, and text-to-speech capabilities.
Data is sent to the Mistral API when your application code makes AI generation requests through the PHP AI Client. The data sent includes your prompts, model configuration, and API key. No data is sent automatically — requests only occur when explicitly triggered by code using the PHP AI Client SDK.
This service is provided by Mistral AI (https://mistral.ai/):
– Terms of Service: https://mistral.ai/terms/
– Privacy Policy: https://mistral.ai/terms/#privacy-policy
/wp-content/plugins/ai-provider-for-mistral/MISTRAL_API_KEY environment variable or constantVisit the Mistral Console to create an account and generate an API key.
No, this plugin requires the PHP AI Client plugin to be installed and activated. It provides the Mistral-specific implementation that the PHP AI Client uses.
voxtral-mini-tts-3-0). Use convertTextToSpeech() or generateSpeech(), choose a voice with asOutputSpeechVoice() and a format with asOutputMimeType() (MP3, WAV, FLAC, Opus, or PCM).ai_provider_for_mistral_default_voice_id and ai_provider_for_mistral_tts_max_text_length filters.mistral-large-4) above dated ids (such as mistral-large-2512), so the newest models in a family are listed first.tool_choice set through custom options is no longer overwritten. Props @TimVanOnckelen.model_length and error finish reasons instead of reporting them as an invalid response. Props @TimVanOnckelen.ai_provider_for_mistral_model_sort_callback filter lets integrators replace the sort comparator.{type: "document_url"} content chunks — document QnA now works through any chat model via a remote URL (upload via the Files API for private documents).Improve package / plugin distribution