|
| 1 | +--- |
| 2 | +title: "Ultimate AI Connector for Compatible Endpoints" |
| 3 | +sidebar_position: 1 |
| 4 | +--- |
| 5 | + |
| 6 | +import AddonBanner from '@site/src/components/AddonBanner'; |
| 7 | + |
| 8 | +<AddonBanner slug="ultimate-multisite-ai-connector-compatible-endpoints" name="Ultimate AI Connector for Compatible Endpoints" /> |
| 9 | + |
| 10 | +# Ultimate AI Connector for Compatible Endpoints |
| 11 | + |
| 12 | +The Ultimate AI Connector for Compatible Endpoints integrates OpenAI-compatible AI provider APIs with your WordPress multisite network. Configure multiple AI providers — each with its own endpoint URL, API key, and default model — and route requests with automatic fallback when a provider is unavailable. |
| 13 | + |
| 14 | +## Key Features |
| 15 | + |
| 16 | +- **Multi-provider support**: Add multiple AI provider cards, each with its own endpoint URL, API key, and default model |
| 17 | +- **Drag-to-reorder**: Arrange providers by priority using the grip handle on each card; requests use providers in order |
| 18 | +- **Automatic fallback routing**: If the primary provider is unavailable, requests automatically fall back to the next configured provider |
| 19 | +- **Per-provider configuration**: Each provider is independently configured with its own credentials and model selection |
| 20 | +- **Card-based settings UI**: Built on stable WordPress 6.9+ Card components (CardBody, CardHeader, CardDivider) |
| 21 | +- **Auto-expand on add**: New provider cards expand automatically so you can fill in the details immediately |
| 22 | +- **Script cache busting**: Provider scripts are cache-busted on plugin update to ensure the latest version is loaded |
| 23 | + |
| 24 | +## Requirements |
| 25 | + |
| 26 | +- WordPress 5.3 or higher |
| 27 | +- PHP 7.4 or higher |
| 28 | +- Ultimate Multisite plugin (active) |
| 29 | +- An OpenAI-compatible API endpoint (self-hosted or third-party) |
| 30 | + |
| 31 | +## Installation |
| 32 | + |
| 33 | +1. Upload the addon files to your `/wp-content/plugins/` directory |
| 34 | +2. Activate the plugin through the 'Plugins' menu in WordPress |
| 35 | +3. Navigate to **Ultimate Multisite → AI Connector** to configure the addon |
| 36 | + |
| 37 | +## Configuration |
| 38 | + |
| 39 | +### Multi-Provider Setup |
| 40 | + |
| 41 | +The configuration screen uses a card-based layout where each card represents one AI provider. You can add as many providers as you need. |
| 42 | + |
| 43 | +#### Adding a Provider |
| 44 | + |
| 45 | +1. Go to **Ultimate Multisite → AI Connector** in the network admin |
| 46 | +2. Click **Add Provider** |
| 47 | +3. A new provider card appears and expands automatically |
| 48 | +4. Fill in the provider details: |
| 49 | + - **Provider Name** — a label to identify this provider (e.g. "OpenAI", "Mistral", "Local Ollama") |
| 50 | + - **Endpoint URL** — the base URL of the OpenAI-compatible API (e.g. `https://api.openai.com/v1`) |
| 51 | + - **API Key** — your API key for this provider |
| 52 | + - **Default Model** — the model identifier to use by default for this provider (e.g. `gpt-4o`, `mistral-small`) |
| 53 | +5. Click **Save Settings** |
| 54 | + |
| 55 | +#### Removing a Provider |
| 56 | + |
| 57 | +Click the **Remove** button on any provider card to delete it. Save settings to apply the change. |
| 58 | + |
| 59 | +#### Reordering Providers |
| 60 | + |
| 61 | +Drag the grip icon (⣿) on the left side of any provider card to reorder it. The order determines fallback priority: requests are sent to the first provider and fall back to subsequent providers if a request fails. |
| 62 | + |
| 63 | +### Fallback Routing |
| 64 | + |
| 65 | +When a request to the primary provider fails — due to a timeout, rate limit, or service outage — the connector automatically retries with the next provider in the list. This continues down the list until a provider succeeds or all providers have been tried. |
| 66 | + |
| 67 | +| Scenario | Behaviour | |
| 68 | +|----------|-----------| |
| 69 | +| Primary provider responds | Request is served normally | |
| 70 | +| Primary provider fails | Request retried with next provider | |
| 71 | +| All providers fail | Error returned to the caller | |
| 72 | + |
| 73 | +Fallback is transparent to the calling plugin or theme — they receive either a successful response or a final error, regardless of how many providers were tried. |
| 74 | + |
| 75 | +### Provider Configuration Reference |
| 76 | + |
| 77 | +| Field | Required | Description | |
| 78 | +|-------|----------|-------------| |
| 79 | +| Provider Name | Yes | Display label for this provider | |
| 80 | +| Endpoint URL | Yes | Base URL of the OpenAI-compatible API | |
| 81 | +| API Key | Yes | Authentication key for this provider | |
| 82 | +| Default Model | Yes | Model identifier used when no model is specified in the request | |
| 83 | + |
| 84 | +## Troubleshooting |
| 85 | + |
| 86 | +### No providers are listed |
| 87 | + |
| 88 | +If the provider list is empty after saving, confirm that: |
| 89 | + |
| 90 | +- You clicked **Save Settings** after adding providers |
| 91 | +- Your browser did not block the settings page from saving (check the browser console for JavaScript errors) |
| 92 | +- The plugin is active and you are on the network admin screen |
| 93 | + |
| 94 | +### Requests are failing for all providers |
| 95 | + |
| 96 | +- Verify each provider's endpoint URL is reachable from your server (not just from your browser) |
| 97 | +- Check that each API key is valid and has not expired |
| 98 | +- Review the provider's rate-limit and quota status in their dashboard |
| 99 | +- Enable WordPress debug logging (`WP_DEBUG_LOG`) to capture detailed error messages from the connector |
| 100 | + |
| 101 | +### A provider is not being used for fallback |
| 102 | + |
| 103 | +Drag-to-reorder changes the fallback order. Confirm the provider you expect to receive fallback requests is positioned correctly in the list and that its endpoint URL and API key are correct. |
| 104 | + |
| 105 | +### New provider card does not expand automatically |
| 106 | + |
| 107 | +Auto-expand requires JavaScript to be enabled in your browser. If the card does not expand on click, check the browser console for errors. The card contents are always accessible by clicking the card header even if auto-expand does not trigger. |
| 108 | + |
| 109 | +## Changelog |
| 110 | + |
| 111 | +See [Changelog](./changelog) for the full version history. |
0 commit comments