dsh-opencode-live-models: Syncing Real-time Model Catalogs Between OpenCode and Codex in DSH

Preface

The pi-ai model catalog built into DeepSeek Harness (DSH) is updated along with release versions, often lagging behind the model lists available online via OpenCode Go, OpenCode Zen, and native OpenAI Codex. If you rely solely on the built-in catalog, new models may not appear in the settings, or retired entries may remain. Manually editing the configuration or waiting for DSH to release an updated catalog is inconvenient for daily development.

Below is a community plugin dsh-opencode-live-models (maintainer: Luca4Don3, category: Model Inference). It refreshes the model catalogs for the above three routes at runtime and merges them into DSH without breaking OpenCode session headers and the prompt-cache retention policy. It also consolidates ChatGPT login, subscription usage, and OpenCode Zen balance queries into the same plugin, reducing the need to separately install “subscription usage” bundles.

What is this

dsh-opencode-live-models is a DSH plugin bundle, current version 0.11.3 (MIT License). It is designed for developers already using pi-ai and OpenCode / Codex routes in DSH, solving two problems: “built-in catalog lag” and “model selection and account-side information scattered across tools.”

The plugin requires DSH 0.1.5-rc.1 or newer, and the plugin itself must be 0.3.0 or newer (since 0.3.0, model descriptors are no longer bundled; on first launch without network, compared to the old version, it will omit a model space-bunny-free that relies solely on bundled descriptors. See the “How it works” section in the repository README for details).

Core Features

Real-time Model Catalog

  • OpenCode Go (opencode-go) and OpenCode Zen (opencode) each refresh from the Pi catalog and live roster, with independent protocol tables; a failure in one gateway does not affect the other catalog.
  • Native OpenAI Codex (openai-codex) also undergoes catalog updates and validation, ETag, caching, and lifecycle mechanisms; Codex still uses native OAuth and transport, and will not inject OpenCode headers or override cache options.
  • Integrates with DSH’s native Settings → Models → Fetch available models and saved model selections; supports both API Key and OAuth routes. Starting from 0.11.x, when live descriptors fill in missing APIs, it also updates runtime diagnostics and error displays in the Models settings.

Login & Subscription / Balance (Read-only)

  • In the sidebar Plugins → dsh-opencode-live-models detail page: Sign in with ChatGPT, re-login, authorization status, callback paste fallback, and cancellation.
  • On the same detail page, you can sign in to OpenCode Console (device authorization; the documented flow only uses https://opencode.ai/console/auth/device/*). Zen billing prioritizes Console workspace login and falls back to API Key only when no Console authorization exists. Expired authorizations will not silently switch keys or workspaces.
  • Settings → Account & balance: Displays subscription information for configured credentials (up to three providers, without duplicating the DeepSeek card) below the official DeepSeek balance. OpenAI and OpenCode Go are prioritized as percentage cards; OpenCode Zen is shown as a full-width currency balance row at the bottom. The page loads on entry, and you can click Refresh usage. It shows remaining quota percentage and reset time, without converting quota into monetary amounts. Results are cached locally and will still show previous data on the next launch after fully exiting DSH (e.g., Command+Q), before background validation of credentials.

When upgrading from the standalone plugin dsh-subscription-usage, disable the old bundle before enabling this plugin to avoid duplicate services. Existing llm-pi-ai/openai-codex and subscriptionUsage related credentials can continue to be used.

Installation & Enablement

The installation spec is downloaded via HTTPS from codeload.github.com. The host must be able to access GitHub (npm mirrors do not proxy this spec).

Desktop: Open Plugins in the sidebar, click Add plugin, paste the spec, select Enable now, and restart DSH:

github:Luca4Don3/dsh-opencode-live-models

CLI: The add command will install and select the bundle. A DSH restart is required to complete compose:

dsh plugin --profile desktop add github:Luca4Don3/dsh-opencode-live-models

Typical Usage

1. Refresh and Select Models

  1. Ensure the corresponding provider is configured in DSH (Codex requires openai-codex in llm-pi-ai providers).
  2. Open Settings → Models, use Fetch available models, check models as needed and save. Unchecked items will only be removed from the catalog after applying the selection and saving (the “only add, never remove” issue is fixed since 0.11.2).
  3. The Go route uses the existing credential reference OPENCODE_GO_API_KEY; Zen uses OPENCODE_API_KEY. OAuth and token refresh are handled by the host; the plugin does not implement OAuth itself or store a separate set of credentials.

2. ChatGPT & Console Login

  1. Complete ChatGPT or OpenCode Console login on the Plugins → dsh-opencode-live-models detail page.
  2. After Console login, select the workspace corresponding to your Zen key on the device authorization page.
  3. Go to Settings → Account & balance to view or Refresh usage. Zen balance depends on the Console or API Key policy as described above.

3. Optional Configuration

Under the opencode-live-models plugin entry, you can write:

config:
  freshMs: 300000
  timeoutMs: 15000
  goApiKeyRef: OPENCODE_GO_API_KEY
  zenApiKeyRef: OPENCODE_API_KEY

freshMs defaults to five minutes, controlling the freshness of usage cards within the same run. Refresh usage will force a new query.

Use Cases & Notes

Suitable for: Developers who use OpenCode Go, OpenCode Zen, or Codex in DSH long-term, want model lists to match upstream, and want to view ChatGPT / Go subscription usage and Zen balance in one place.

Notes:

  • The plugin runs with the permissions of the current DSH process. Before installation, you should read the source code and MIT license on GitHub to assess the trust boundary yourself.
  • Disabling the plugin cancels ongoing device authorization and billing requests. Uninstalling aborts ongoing catalog requests (since 0.6.0).
  • The community catalog SkillHub plugin page and GitHub repository are independent information sources, with no official affiliation with DeepSeek / High-Flyer. The DSH ecosystem follows the “everything is a plugin” philosophy; refer to the repository README and release notes for details.

Conclusion

dsh-opencode-live-models consolidates live model catalogs, native model selection, and ChatGPT / Console login and read-only usage display for OpenCode Go, OpenCode Zen, and Codex into one bundle, reducing the gap while waiting for pi-ai’s built-in catalog updates. For installation specs, changelogs, and details, please consult the GitHub README and SkillHub catalog page.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye