Skip to content

About

WordPress AI provider to use mittwald hosted LLMs in WordPress AI Experiments

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

mittwald AI Provider for WordPress

A WordPress plugin that integrates mittwald AI Hosting with WordPress AI features, enabling AI-powered features on your WordPress site using mittwald's infrastructure.

About

This plugin provides a mittwald provider implementation for WordPress AI features, allowing you to leverage mittwald's AI hosting platform.

To actually use the connector, you need a plugin that makes use of the AI connector. The Plugin AI Experiments is the official example.

Credit: This provider implementation is forked from the OpenAIProvider in php-ai-client and adapted for mittwald's AI hosting platform, which uses an OpenAI-compatible API.

Requirements

Installation

Install this plugin:

  • Download this plugin from the WordPress plugin directory as a ZIP file
  • Upload to WordPress
    • Navigate to "Plugins" → "Add New" (/wp-admin/plugin-install.php) and click "Upload Plugin".
    • Choose the downloaded ZIP file and click "Install Now".
  • Activate the Plugin

Alternatively, use the WP CLI to install this plugin:

$ wp plugin install --activate mittwald-ai-provider

Configuration

  1. Obtain an API Key: Follow the mittwald AI Hosting access guide to get your API credentials.
  2. Store AI Client Credentials (choose one):
    • In WordPress admin:

      • Navigate to Settings > Connectors (/wp-admin/options-connectors.php)
      • Fill in the mittwald API key and save
    • In wp-config.php via WP-CLI:

      $ wp config set MITTWALD_API_KEY your-api-key
    • In wp-config.php via direct file edit:

      define( 'MITTWALD_API_KEY', 'your-api-key' );
    • As environment variable (for example in Apache config):

      SetEnv MITTWALD_API_KEY your-api-key
  3. Enable AI experiments (optional):
    • To actually use the connector, you need a plugin that makes use of the AI connector. The Plugin AI Experiments is the official example. Install and activate the plugin.
    • Navigate to Settings > AI Experiments (/options-general.php?page=ai-experiments)
    • Select »Enable Experiments« and Save
    • Select the Experiments you want to use and Save

Supported Operations & Models

Chat Completions ✅

Fully supported for conversational AI, content generation, and chat-based interactions.

Available Models:

  • GPT-OSS: gpt-oss-120b
  • Qwen: Qwen3.5-122B-A10B-FP8, Qwen3.6-35B-A3B-FP8 and Qwen3.8-27B-NVFP4 (support vision/image input), Qwen3.5-0.8B
  • Ministral: Ministral-3-14B-Instruct-2512 (supports vision/image input)
  • GLM OCR: GLM-OCR, for extracting text from an image; it takes an image with a text prompt and supports none of the capabilities below

Capabilities:

  • Standard text chat
  • Image vision (Ministral and the larger Qwen models)
  • JSON output formatting
  • Tool/function calling

Embeddings ✅

Available Models:

  • Qwen Embedding: Qwen3-Embedding-8B

Capabilities:

  • Text to vector, one embedding per input
  • 4096-dimensional vectors by default, up to 32,768 tokens of context per input
  • A narrower vector on request, via the dimensions option
  • Several inputs per request; embeddings are returned in input order

The dimensions option accepts 256, 512, 768, 1024, 1536, 2048, 3072 and 4096; 256 is the documented floor, as retrieval quality degrades below it. Any other width is refused before a request is sent: automatic model selection finds no suitable model, and an explicitly chosen model rejects the width and lists the accepted ones. Pass the width through the dimensions option itself; as a custom option it is refused. The endpoint L2-normalises a projected vector, so you can use it directly for dot-product similarity without normalising it yourself.

Vector storage is out of scope for this plugin — it returns the vectors and never touches a database.

Embeddings need version 1.4.0 or newer of the WordPress AI client. WordPress 7.0 and 7.1 bundle an older version, but the AI Experiments plugin adds embedding support to it from version 1.3.0 on. Without either, the embedding model is not offered, and every other model keeps working.

Text to Image ⏸️

Not currently supported by mittwald AI Hosting.

Text to Speech ✅

Available Models:

  • Qwen TTS: Qwen3-TTS-12Hz-1.7B-CustomVoice

Capabilities:

  • Voices: aiden, dylan, eric, ono_anna, ryan, serena, sohee, uncle_fu, vivian (defaults to aiden)
  • Output formats: audio/mpeg (default), audio/wav, audio/flac, audio/ogg
  • Parameters such as speed, language and instructions

Speech to Text / Audio Transcription ⏸️

Not currently implemented.

Moderation ⏸️

Not currently supported by mittwald AI Hosting.

Rate Limits & Quotas

mittwald AI Hosting has usage limits based on your account tier. For details on usage limits and terms, see the mittwald AI Hosting terms of use.

Resources

Development

Coding Standards

  • Follows WordPress coding standards
  • No debugging statements allowed in commits

Contributing

Contributions are welcome! Areas where help is especially appreciated:

  • Adding tests
  • Documentation improvements
  • Bug fixes and performance improvements

To build an installable development version from source, run the package composer script:

$ composer run package

This command will create a ZIP file in the project directory that can be uploaded to a WordPress installation.

License

GPL-2.0-or-later

Support

For issues related to:

About

WordPress AI provider to use mittwald hosted LLMs in WordPress AI Experiments

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Contributors

Languages