
內容簡介
此外掛提供 WordPress 與 OpenCode Zen 的整合,讓使用者能透過單一的 OpenAI 相容 API 存取多達 57 種 AI 模型,如 GPT、Claude、Gemini 等,簡化管理與使用流程。
【主要功能】
• 一個 API 金鑰存取 57 種模型
• 自動模型發現與每小時快取
• 完整參數控制,無需編碼
• 設定頁面可配置預設模型
• 環境變數支援,無需資料庫
• 無供應商鎖定,自由切換模型
外掛標籤
開發者團隊
② 後台搜尋「AI Provider for OpenCode Zen」→ 直接安裝(推薦)
原文外掛簡介
This plugin provides OpenCode Zen integration for the WordPress AI Client. It enables WordPress sites to use OpenCode Zen’s AI gateway — accessing GPT, Claude, Gemini, Qwen, MiniMax, Kimi, and more through a single OpenAI-compatible API.
This plugin is an independent, third-party integration and is not affiliated with, endorsed by, or sponsored by OpenCode Zen.
Why OpenCode Zen?
OpenCode Zen is an AI model aggregator — one API key gives you access to 57 frontier models from OpenAI, Anthropic, Google, and others. Instead of managing separate API keys and billing accounts for each AI provider, you connect once to OpenCode Zen and switch between models freely.
This makes it ideal for WordPress sites that want to experiment with different AI models, compare output quality, or use specialised models (e.g. a coding model for code-related tasks and a creative model for content).
Features
57 models from one API key — GPT 5.x, Claude, Gemini 3.x, Qwen, MiniMax, Kimi, Grok, DeepSeek, and more
Automatic model discovery — live model list fetched from the OpenCode Zen API and cached hourly; falls back to a hardcoded list when offline
Full parameter control — temperature, max tokens, top P, presence penalty, frequency penalty, stop sequences, system instruction, and function declarations
Settings page — configure default model and generation parameters without touching code
API key via Connectors — enter your key once in Settings > Connectors; all AI-enabled plugins share it automatically
Environment variable support — OPENCODE_ZEN_API_KEY for server-level configuration, bypassing the database entirely
OpenAI-compatible API — built on the same protocol as OpenAI, so any model that works with the OpenAI provider works here
No vendor lock-in — switch between GPT, Claude, and Gemini without changing plugin or configuration
What Can You Do With AI in WordPress?
Once this provider is configured, any WordPress plugin or theme that integrates with the WordPress AI Client can use it:
Block editor (Gutenberg) — AI writing assistance, rephrasing, summarising, and expanding content
WooCommerce — AI-generated product descriptions, SEO meta titles, and customer review summaries
SEO plugins — generate meta descriptions, focus keyphrases, and Open Graph content
Customer support — power AI chatbots and FAQ auto-responses
Translation and localisation — translate and adapt content for different markets
Code generation — use a coding-specialised model (GPT 5.3 Codex, Grok Build) directly in the editor
Image alt text — generate accessible alt attributes for media library images
Supported Models
When an API key is configured, the live model list is fetched directly from the OpenCode Zen API, so you always see the latest models. If the API is ever unavailable, a built-in fallback list of 57 models keeps everything working. Families include:
GPT 5.x — Sol, Terra, Luna, plus Pro, Mini, Nano, and Codex variants
Claude — Fable 5, Opus 4.x, Sonnet 5 / 4.x, Haiku 4.5
Gemini 3.x — Flash, Flash Lite, and Pro
More — Grok, Qwen, DeepSeek, MiniMax, GLM, Kimi, and free-tier models
See the full model catalogue for every model ID.
Requirements
PHP 7.4 or higher
WordPress 7.0 or higher
An OpenCode Zen account and API key
How the WordPress AI Provider System Works
WordPress 7.0 introduced a built-in AI Client SDK. Plugins and themes call a standard API (e.g. “generate text from this prompt”) without knowing which AI provider is active. Provider plugins like this one register themselves with WordPress and handle the actual API calls.
This means:
Install this plugin → OpenCode Zen is registered as an AI provider
Enter your API key in Settings > Connectors
Every AI-enabled plugin on your site can now use OpenCode Zen automatically
You can also install multiple provider plugins and switch between them from the Connectors screen — no re-configuration of individual plugins needed.
Settings
Go to Settings > OpenCode Zen to configure:
Default Model — the model used when no explicit model is requested by a plugin
Temperature — controls output randomness (0.0–2.0, default 0.7)
Max Tokens — maximum tokens in the response (1–200,000, default 4096)
Top P — nucleus sampling threshold (0.0–1.0, default 1.0)
Presence Penalty — penalises repeated topics (-2.0–2.0, default 0.0)
Frequency Penalty — penalises repeated tokens (-2.0–2.0, default 0.0)
For Developers
This plugin follows the official WordPress AI Provider pattern and works with any plugin built on the WordPress AI Client SDK. It registers the opencode-zen provider and supports the standard generation options (temperature, max tokens, top P, presence/frequency penalties, stop sequences, system instruction, and function declarations).
The source code is on GitHub — bug reports and pull requests are welcome:
Repository: github.com/mralaminahamed/ai-provider-for-opencode-zen
Report a bug or request a feature: open a new issue
Contribute code: submit a pull request
Developer documentation:
Usage and code examples
Architecture and API key resolution
Development and contributing
External Services
This plugin connects to the OpenCode Zen API (https://opencode.ai/zen/v1) to:
Retrieve the list of available AI models (cached for 1 hour via WordPress transients)
Send text generation requests using your configured model
Service: OpenCode Zen
API endpoint: https://opencode.ai/zen/v1
When data is sent: When generating AI text or refreshing the model list
Data sent: Your API key (via Authorization header) and the text prompt/conversation
Provider site: opencode.ai — refer to the OpenCode Zen website for their current Terms of Service and Privacy Policy.
No data is sent to the OpenCode Zen API until you enter an API key and a WordPress feature triggers a text generation request.
