AI Provider for OpenCode

外掛說明

WordPress can talk to AI services through a shared system called the PHP AI Client. That system still needs a small bridge for each service you want to use. This plugin is the bridge for OpenCode.

Once the plugin is active, OpenCode becomes available as an AI option on your site. You can generate text, continue multi-step conversations, and see which models OpenCode currently offers. There is no separate settings page and nothing you need to wire up by hand.

In short: install, activate, add your OpenCode key, and you are set.

Features

  • Text generation: Write, summarize, rewrite, or analyze content with OpenCode’s language models.
  • Conversation memory: Follow-up messages can keep earlier context, so exchanges feel more natural.
  • Up-to-date model list: The plugin asks OpenCode which models are available, so new ones can show up without a plugin update.
  • Works out of the box: After activation, OpenCode is registered automatically with WordPress’s AI system.

Requirements

  • PHP 7.4 or newer on your hosting plan.
  • WordPress 7.0 or newer is the simple path: AI support is already included.
  • WordPress 6.9 only: you also need the PHP AI Client installed separately.
  • An OpenCode API key so OpenCode can authorize your site’s requests.

External Services

This plugin sends data to OpenCode when you use AI features. Here is what that means in practice:

What is sent and when:
* Your API key: sent with requests so OpenCode can verify your account.
* Your prompts and messages: sent when you ask the AI to do something. Only share text you are comfortable sending to a third-party service.
* A model list request: used so WordPress can show which OpenCode models are available.
* Nothing is sent while you are not using AI features.

Service details:
* Service: OpenCode
* API endpoint: https://opencode.ai/zen/go/v1
* Terms of service: opencode.ai/terms

螢幕擷圖

安裝方式

  1. Install the plugin from the WordPress admin (Plugins Add New), or upload the plugin folder to /wp-content/plugins/.
  2. Activate it under Plugins.
  3. (Recommended) Add your OpenCode API key to wp-config.php: define( 'OPENCODE_API_KEY', 'your-api-key-here' ); Use your real key in place of your-api-key-here. The sample text will not work as a live key.

That is all: install, activate, and add the key.

常見問題集

How do I get an OpenCode API key?

Go to opencode.ai, create an account (Go or Zen plan), and generate a key in your dashboard. The plugin uses that key so OpenCode knows the requests come from you.

Does this plugin work on its own?

No. It connects OpenCode to WordPress’s AI system (the PHP AI Client). On WordPress 7.0+, that system is already there. On WordPress 6.9, you need to install it first. This plugin is not a full chatbot product by itself; it is the OpenCode connection layer.

What models can I use?

The list comes from OpenCode and can change. Examples at the time of writing include:
DeepSeek-V4-Pro
DeepSeek-V4-Flash
GLM-5.1
GLM-5
Hy3 Preview
Kimi-K2.6
Kimi-K2.5
Mimo-V2-Pro
Mimo-V2-Omni
Mimo-V2.5-Pro
Mimo-V2.5
MiniMax-M3
MiniMax-M2.7
MiniMax-M2.5
Qwen3.7-Max
Qwen3.7-Plus
Qwen3.6-Plus
Qwen3.5-Plus

New models may appear automatically. OpenCode may also retire older ones.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈AI Provider for OpenCode〉的開發相關工作。

參與者

〈AI Provider for OpenCode〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈AI Provider for OpenCode〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0.0

  • Initial release.

    • Text generation with OpenCode Go and Zen models.
    • Conversation history for available models.
    • Live model list from OpenCode, so new models can appear without a plugin update.
    • Automatic connection to WordPress’s AI system.
    • Provider logo and description (needs PHP AI Client SDK 1.2.0 or newer).