Zactonz AI Connector for Mistral AI
v1.0.0Mistral AI connector for the WordPress AI Client. Open-weight and commercial models, vision, tool calling, structured output with a real JSON schema and reasoning effort, with every capability read from Mistral's own catalogue.
Installation & setup
Install the plugin#
This connector is awaiting review for the WordPress plugin directory. The directory steps below are the route once it is listed; until then, install it from the plugin zip.
From the dashboard, go to Plugins › Add New, search for Zactonz AI Connector for Mistral AI and click Install Now, then Activate. WordPress also links here directly from Settings › Connectors when it needs a connector that is not installed yet.
With WP-CLI:
wp plugin install zactonz-ai-connector-for-mistral-ai --activate
To install manually, upload the folder to /wp-content/plugins/zactonz-ai-connector-for-mistral-ai/ and activate it from the Plugins menu.
Connect to Mistral AI#
- Create an API key in the Mistral AI console.
- Go to Settings › Connectors and paste the key into the Mistral AI connector.
- Go to Settings › Mistral AI to review the discovered models and choose a default model per capability, a reasoning level for the default text model, and the request timeouts.
The key is stored in the option WordPress registers for the connector, so the Connectors screen and the connector's own settings screen always show the same credential.
Keep the key out of the database#
Define MISTRAL_API_KEY in wp-config.php, or set an environment variable of the same name. When either is present the connector uses it, the settings field is disabled, and nothing is written to the database.
define( 'MISTRAL_API_KEY', '…' );
Choosing a default model#
Mistral AI returns its whole catalogue from one endpoint, so the picker shows more than you will use. A few things are worth knowing while you choose:
- An alias such as
mistral-small-latestfollows Mistral's newest release of that model, including across generations. Pinning a version identifier such asmistral-small-2603keeps behaviour and pricing stable, at the cost of having to move it yourself later. - A model with an announced retirement date still answers until that date. The connector keeps it in the list but will not pick it for you.
- A
labs-model is experimental and Mistral does not recommend it for production. It is listed last for that reason.
Reasoning effort#
Mistral's newer general-purpose models think on request rather than always. Settings › Mistral AI has a reasoning control that applies to the default text model; it is sent only with requests to that model and left off every other request. No reasoning turns it off. Which levels a model accepts is up to Mistral, so a model that does not reason, or that does not accept the level chosen, may ignore or refuse it. A reasoning reply takes longer to arrive, so raise the request timeout if you ask for long answers at the highest level.
Embeddings#
Mistral AI offers mistral-embed for text and codestral-embed for code. The connector discovers both and generates embeddings singly or in batches, but only once the WordPress AI Client ships its embedding model contract — WordPress 7.1 defines the capability without it. Until then the embedding models are not offered, because offering one would fail the moment it was used.
Use a proxy or gateway#
Settings › Mistral AI has an API base URL field. Leave it empty to use https://api.mistral.ai/v1, or point it at a gateway that speaks the same API.
AI features reach the gateway through the WordPress AI Client, which sends every request with wp_safe_remote_request(). WordPress refuses such requests to loopback and private network addresses and to any port other than 80, 443 and 8080, so a gateway on a LAN address or a non-standard port will not work unless the site allows that host with the http_request_host_is_external filter. The connector's own connection check and Site Health test do not apply that restriction, so with such a gateway they can report a healthy connection while AI features still cannot reach it. Use a public hostname on a standard port, or add the filter.
Check the connection#
Tools › Site Health includes a connectivity test for Mistral AI, which runs in the background so it never holds the screen open. Settings › Mistral AI has a diagnostics button that reports the endpoint, HTTP status, latency, the number of discovered models, any configured defaults missing from the current catalogue, and the AI Client version. The key never appears in the report.