WP Manifestindependent plugin directory
manifest / ai / ai-experiment-models

AI Experiment Models

Adds a Settings page to manage which AI provider and model each AI plugin experiment uses.

by WP AI Workshop · github.com/jonathanbossenger/ai-experiment-models · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/jonathanbossenger/ai-experiment-models/archive/refs/heads/trunk.zip

Readme

AI Experiment Models

Manage which AI provider and model each experiment of the AI plugin uses, from a dedicated WordPress Settings page.

AI Experiment Models is a companion plugin for the WordPress AI plugin. It adds a Settings → AI Experiment Models admin page where a site owner can choose, per experiment, which connected provider (e.g. Anthropic, Google, OpenAI) and model should be used — without writing any code or filters.

Why

The AI plugin ships several AI experiments (Title Generation, Summarization, Alt Text Generation, and more). By default each experiment picks a model from the plugin's preferred-model list. The AI plugin can override the model per experiment, but only through a developer-mode option. This plugin surfaces that capability as a simple, dedicated Settings page so a non-developer site owner can manage it.

Features

  • One page for every experiment. Lists all AI experiments that actually call a model, grouped with their capability (Text, Image, or Vision) and stability badge.
  • Only shows what's available. Provider and model dropdowns are populated from the providers you've actually connected, via the AI plugin's /ai/v1/providers REST endpoint.
  • Per-experiment overrides. Pick a provider and model for one experiment, leave the rest on the plugin default.
  • Safe defaults. Choosing "— Use plugin default —" clears the override so the AI plugin falls back to its own preferred-model list.
  • No core edits. Uses the AI plugin's public extension points only. Selections are stored in the AI plugin's own option, so it applies them automatically.

Screenshot

Settings → AI Experiment Models — a table of experiments, each with a Provider and Model selector.

Requirements

  • WordPress 6.7+
  • PHP 7.4+
  • The AI plugin installed, built, and active
  • At least one AI provider connected (Settings → Connectors) for models to appear

[!IMPORTANT] The AI plugin must have its build assets compiled or it will not load (and this plugin will show an "AI plugin not active" notice). If you installed the AI plugin from its Git repository, run nvm use && npm ci && npm run build inside wp-content/plugins/ai first.

Installation

  1. Copy the ai-experiment-models folder into wp-content/plugins/.
  2. Ensure the AI plugin is installed, built, and active.
  3. Activate AI Experiment Models from Plugins.
  4. Go to Settings → AI Experiment Models.

Usage

  1. Open Settings → AI Experiment Models.
  2. For any experiment, choose a Provider. The Model dropdown then fills with that provider's compatible models.
  3. Leave an experiment on — Use plugin default — to let the AI plugin choose the model.
  4. Click Save Models.

Your choices take effect the next time that experiment runs.

How it works

This plugin is intentionally thin — it drives the AI plugin's existing per-feature model machinery rather than reimplementing model selection.

Concern Mechanism
Discover experiments The AI plugin's wpai_default_feature_classes filter. Experiments whose capability is none (e.g. Abilities Explorer) are skipped because they don't call a model.
List providers & models GET /ai/v1/providers?capability={text_generation\|image_generation\|vision} (AI plugin REST route, manage_options only).
Persist a selection Saved to the AI plugin's own option wpai_feature_{experiment_id}_field_developer as { "provider": "…", "model": "…" }.
Apply a selection The AI plugin reads that option via WordPress\AI\get_feature_developer_model_config() and applies it in Abstract_Ability::set_provider_model_preference() when building the prompt.

Because the plugin writes to the AI plugin's own option, there is no separate data store to keep in sync and nothing to migrate if this plugin is removed.

Data & privacy

This plugin stores only your provider/model choices in the WordPress options table. It makes no external requests itself — model discovery goes through the AI plugin's REST endpoint, and prompts are sent by the AI plugin, not this one.

Uninstalling

Deactivating or deleting this plugin leaves your saved provider/model choices intact (they live in the AI plugin's options). To revert an experiment to the default, set it back to — Use plugin default — and save before removing the plugin.

Development

The plugin is a single-file plugin plus assets:

ai-experiment-models/
├── ai-experiment-models.php   # menu, settings page, save handler, dependency guard
├── assets/
│   ├── admin.js               # dynamic provider → model dropdowns (uses wp.apiFetch)
│   └── admin.css              # settings page styling
├── readme.txt                 # WordPress.org-style readme
└── README.md

Everything lives under the WP_AI_Workshop\Experiment_Models namespace and hooks into standard WordPress admin actions (admin_menu, admin_enqueue_scripts, admin_post_*).

License

GPL-2.0-or-later

Read the full README on GitHub →