DuoPort Connector for OpenCode

Description

DuoPort Connector for OpenCode registers two WordPress AI Client providers:

  • OpenCode Go for the subscription catalog.
  • OpenCode Zen for the pay-as-you-go catalog, including reviewed free-model records.

Enter your opencode.ai key in the Go and Zen fields on Settings Connectors. In most cases, the same key works for both catalogs, while each field remains independently testable. DuoPort keeps credentials in WordPress and keeps model policy in a reviewed registry.

This plugin is not affiliated with or endorsed by OpenCode (Anomaly Innovations, Inc.).

Why DuoPort?

DuoPort gives WordPress teams a small, auditable OpenCode bridge instead of another opaque AI dashboard. It works with the native WordPress AI Client, keeps Go and Zen catalog identities separate, and exposes only model routes whose endpoint and capability contracts have been reviewed. The optional Model Radar tracks public catalog changes and queues new or free-model candidates for verification; it never auto-promotes a model.

OpenCode Go and Zen

OpenCode Go

Use the Go subscription catalog for its reviewed text-generation models. Go availability is checked with a bounded probe and transient cache, so the plugin can report configured or unavailable states without repeatedly calling the catalog API.

OpenCode Zen

Use the Zen pay-as-you-go catalog for reviewed text-generation models, including records explicitly identified as free. Free availability is supplied by OpenCode and can change; a free-looking model name is only a verification candidate, not a promise of free access.

Current OpenCode models

Model lists change over time. By default, DuoPort presents the reviewed chat/completions records for each catalog and labels Zen free records. The credential-free Model Radar compares current public Go and Zen /models evidence with that registry and reports new, retired, unsupported, and verification-required changes in one aggregate issue.

Enable Show all models only when you want to inspect the complete live catalog. Unknown models, unknown endpoint families, unsupported capabilities, and unverified free-name candidates remain default-deny; discovering a model is not the same as making it routable.

Free OpenCode models

Zen records matched against OpenCode’s published pricing table are marked (Free) in the model picker when they are part of the reviewed registry. Free models still require an API key and may have limits, availability changes, or catalog retirement. DuoPort does not promise that every free-looking ID is free or supported.

WordPress AI Client integration

DuoPort uses the native WordPress AI Client provider registry. It does not create a separate site-wide model router, duplicate WordPress credentials, or read connector secrets for diagnostics. Model selection, metadata, and request transport remain inside the plugin’s reviewed boundaries.

Verified model support

Only reviewed chat/completions records are advertised by default. The current adapter does not claim Responses, Messages, image, tool, or web-search support unless the corresponding contract is explicitly present in the registry. Unknown or unresolved routes fail clearly instead of silently falling back.

Features

  • Two providers (opencode-go / opencode-zen) auto-discovered by the Connectors screen.
  • Reviewed chat/completions-routable models per catalog (Go: 11, Zen: 15) — present in the live OpenCode /models catalog and recorded as routable in the reviewed registry.
  • Explicitly reviewed free models labeled (Free) in the model picker (Zen catalog).
  • Credential-free Model Radar and catalog watch for fast-follow verification work.
  • Availability probe with transient caching — validates key without calling /models.
  • Show all models toggle on Settings DuoPort Connector (off by default).

External Services

This plugin connects to the OpenCode API (https://opencode.ai) to list models, check availability, and generate text.

  • Your API key is sent with every request.
  • Prompts and messages you submit for generation are sent to OpenCode’s servers.
  • Model list is fetched from https://opencode.ai/zen/go/v1/models and https://opencode.ai/zen/v1/models.
  • Availability is validated by a chat/completions probe (max_tokens: 1).
  • See https://opencode.ai/legal/terms-of-service for terms and https://opencode.ai/legal/privacy-policy for privacy policy.

Screenshots

Installation

  1. Upload to /wp-content/plugins/duoport-connect-for-opencode
  2. Activate through the Plugins menu
  3. Go to Settings Connectors and enter your opencode.ai key in both the Go and Zen fields (in most cases the same key works for both catalogs)
  4. (Optional) Go to Settings DuoPort Connector to enable Show all models or check connection status
  5. Use the WordPress AI Client’s normal provider/model selection flow

FAQ

Where do I get an API key?

Visit https://opencode.ai/auth and sign up for Go or Zen. In most cases, the same key works for both catalogs.

Do Go and Zen use the same API key?

In most cases, yes. OpenCode uses a unified auth domain, so paste the same opencode.ai key into both the Go and Zen fields on Settings Connectors. Each catalog keeps its own key field so WordPress can validate them independently.

Which models are available?

By default, only reviewed chat/completions models are shown. Zen may include explicitly reviewed free-model records. Enable Show all models on Settings DuoPort Connector to inspect every live API model, including non-chat models that may fail. The toggle is for inspection, not a guarantee of support.

Does it work without WordPress 7.0?

No. Requires WordPress 7.0+ and PHP 8.2+. On older installs an admin notice is shown and registration is skipped.

Why does the dashboard still say connected” when the provider is answering with an error?

When the gateway answers with a response this plugin has no rule for (for example a new status or error shape), the dashboard keeps the value from the last successful check instead of flipping to not connected”, so an unrecognised reply does not disconnect a working key. That stored value is written only by a successful check, lasts up to 30 days from that check (each new success extends it), and the probe result itself is cached for roughly five minutes, so a change can lag behind the gateway by that much. Only a recognised credential answer (an invalid or missing key) clears the stored value; a failure naming the probed model also leaves it alone, and a catalog that never checked successfully still reads not connected”. If the stored value looks stale, change or re-enter the key for that catalog on Settings Connectors, which clears it, or wait for a later probe to return a definitive answer.

Is DuoPort affiliated with OpenCode?

No. DuoPort is an independent WordPress integration and is not endorsed by OpenCode or Anomaly Innovations, Inc.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“DuoPort Connector for OpenCode” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.1.9

  • Fixed: three Zen MiniMax models (minimax-m3, minimax-m2.7, minimax-m2.5) were allowlisted but blocked as unsupported, hiding them from the picker and failing generation. They match OpenCode’s published Zen chat/completions endpoint table and are now routed as chat.
  • Changed: allowlisted models whose chat/completions family is not evidenced in OpenCode’s published endpoint/pricing tables are now recorded as verification-required and stay hidden until a chat/completions probe passes (Go: glm-5.1, glm-5, kimi-k2.5, mimo-v2-pro, mimo-v2-omni, hy3-preview). Default-visible counts are now Go: 11, Zen: 15.
  • Removed: mimo-v2.5-free and deepseek-v4-flash-free left the Zen allowlist and free set — neither ID is present in the live Zen /models catalog anymore. big-pickle keeps its reviewed free label: it is billed Free in OpenCode’s published Zen pricing table (https://opencode.ai/docs/zen/#pricing).
  • Fixed: free-model labels are now per-catalog, so a free-named ID in one catalog can never mislabel the other catalog’s picker.
  • Fixed: network uninstall now sweeps the settings row and plugin transients on every subsite (capped), instead of only the current site.
  • Improved: the reviewed-model counts in the documentation are now covered by a test that reads them from the registry, so they cannot drift again.

0.1.8

  • Fixed: rotating a saved key did not clear its cached availability state.
    WordPress passes the option name as the THIRD argument to
    update_option_{$option} but as the FIRST to add_option_ and
    delete_option_. The cleanup hook read the first argument, so on a key
    CHANGE it received the previous key text, did not match, and cleared
    nothing. A rotated key could keep its last-known-good state for up to 30
    days. Removal and first-time setup were never affected.
  • Fixed: an error naming the credential only in its message text, with no
    machine-readable code, could be read as the model was retired” and leave a
    revoked key marked valid.
  • Fixed: a provider error naming PROBE_MODEL in its message text is now treated
    as telling us nothing about the key, instead of being recorded as a fresh
    result and overwriting what was known before. No model has been retired.
    PROBE_MODEL is still sent on every probe; this release only adds handling for
    a future retirement.
  • Behaviour to be aware of: when the gateway answers with a response this plugin
    has no rule for, the dashboard keeps reporting the last successful check
    (connected”) instead of flipping to not connected”, so an unrecognised
    reply or outage does not disconnect a working key. That stored value is
    written only by a successful check and lasts up to 30 days from that check
    (each new success extends it), plus roughly five minutes of cached probe
    result before a new probe is sent, so a change can lag behind the gateway
    by that much. Only a recognised credential answer (an invalid or missing
    key) clears the stored value; a failure naming the probed model leaves it
    alone too, and a catalog that never checked successfully still reads not
    connected”. Changing or re-entering the key for that catalog on
    Settings Connectors clears the stored state; otherwise wait for a later
    probe to return a definitive answer.

0.1.7

  • Fixed: credential verification now detects the WordPress AI Client HTTP method enum correctly, so valid keys are no longer treated as unverifiable because of a dynamic SDK method.
  • Improved: temporary server, transport, and rate-limit outcomes preserve the last known good configuration state; Zen free-tier limits are still recognized as a valid key.
  • Fixed: malformed model-list entries with non-scalar IDs are skipped safely instead of causing a fatal error.
  • Fixed: endpoint-family and catalog identifiers now use shared constants in the registry, metadata, and Model Radar paths.
  • CI: release verification now runs the test suite on PHP 8.2, 8.3, 8.4, and 8.5.

0.1.6

  • Added two real WordPress.org screenshots for the Connectors and DuoPort Settings screens.
  • Expanded the listing with factual Go + Zen, free-model, verified-support, and WordPress AI Client sections.
  • No model registry, transport, capability, or credential behavior changed.

0.1.5

  • Centralized Go session and client User-Agent headers across text and image requests.
  • Added an authoritative architecture baseline, class inventory, dependency graph, boundaries, scope, improvement rules, and single-item improvement queue.
  • Hardened release documentation so post-0.1.4 additions carry accurate @since metadata.

0.1.4

  • Added deepseek-v4.1-flash to the Go catalog.
  • Fixed: the key validation probe now sends the required x-opencode-session header and probes an authentication-discriminating model, so valid Go/Zen keys are accepted instead of rejected.
  • Added image-generation model path: image-capable models advertise the imageGeneration capability through new Go/Zen image models behind a per-catalog allowlist. Ships with no image IDs allowlisted yet, so the path stays inert and text generation is unaffected. Also added a Media Library saver with MIME, size, and capability guards.

0.1.3

  • Updated Zen model catalog: removed hy3-free and laguna-s-2.1-free, which OpenCode retired from the API.

0.1.2

  • Fixed: Go and Zen now use separate API key fields on the Connectors screen. The previous shared-key setup made WordPress reject valid keys on save (It was not possible to connect to the provider using this key”). If you connected 0.1.1, please re-enter your key in both fields after updating.

0.1.1

  • Renamed plugin to DuoPort Connector for OpenCode; Go and Zen now share a single API key field on the Connectors screen; connecting the providers now requires a one-click approval consent in the Connectors screen.

0.1.0

  • Initial release: Go and Zen providers, allowlisted models with free labels, probe availability, shared-key sync, and Show all models toggle.