
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 );
};
}
);
This plugin connects to the Mistral AI API (https://api.mistral.ai/v1) to provide AI text generation and image generation 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