Download the PHP package saarnilauri/ai-provider-for-mistral without Composer
On this page you can find all versions of the php package saarnilauri/ai-provider-for-mistral. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download saarnilauri/ai-provider-for-mistral
More information about saarnilauri/ai-provider-for-mistral
Files in saarnilauri/ai-provider-for-mistral
Package ai-provider-for-mistral
Short Description Independent WordPress AI Client provider for Mistral. Works as both a Composer package and WordPress plugin.
License GPL-2.0-or-later
Homepage https://github.com/saarnilauri/ai-provider-for-mistral
Informations about the package ai-provider-for-mistral
AI Provider for Mistral
A third-party provider for Mistral in the PHP AI Client SDK. Works as both a Composer package and a WordPress plugin.
This project is independent and is not affiliated with, endorsed by, or sponsored by Mistral AI.
Requirements
- PHP 7.4 or higher
- wordpress/php-ai-client must be installed
Installation
As a Composer Package
The Composer distribution is intended for library usage and excludes ai-provider-for-mistral.php.
As a WordPress Plugin
- Download
ai-provider-for-mistral.zipfrom GitHub Releases (do not use GitHub "Source code" archives) - Upload the ZIP in WordPress admin via Plugins > Add New Plugin > Upload Plugin
- Ensure the PHP AI Client plugin is installed and activated
- Activate the plugin through the WordPress admin
Installing with WP-CLI
Use the release ZIP URL from GitHub Releases — not the auto-generated main.zip source archive, which is missing the bundled dependencies:
Replace v1.0.1 with the desired release tag.
Building the Plugin ZIP
Build a distributable plugin archive locally:
The ZIP is created at dist/ai-provider-for-mistral.zip and includes ai-provider-for-mistral.php.
Testing
Install development dependencies:
Run unit tests:
Run integration tests (requires MISTRAL_API_KEY):
Release Workflow
This repository includes a GitHub Actions workflow at .github/workflows/release-plugin-zip.yml:
- On tag pushes matching
v*, it buildsdist/ai-provider-for-mistral.zip - For tagged releases, it derives the version from the tag (for example
v0.1.0->0.1.0) and validates committed metadata:readme.txtStable tagmust match the tag versionai-provider-for-mistral.phpVersionmust match the tag version
- If versions do not match, the workflow fails
- It uploads the ZIP as a workflow artifact
- It attaches the ZIP to the GitHub release for that tag
Usage
With WordPress
The provider automatically registers itself with the PHP AI Client on the init hook. Simply ensure both plugins are active and configure your API key:
As a Standalone Package
Image Generation
Mistral supports image generation through its Agents API. The provider handles the multi-step flow (agent creation, conversation, file download) automatically:
Supported Models
Available models are dynamically discovered from the Mistral API. This includes text models and, for compatible models, vision and function-calling capabilities. Image generation is supported through models like mistral-medium-2505. See the Mistral documentation for the full list of available models.
Configuration
The provider uses the MISTRAL_API_KEY environment variable for authentication. You can set this in your environment or via PHP:
External Services
This plugin connects to the Mistral AI API 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:
License
GPL-2.0-or-later