dsh-opencode-go-catalog: A Real-Time Maintained OpenCode Go Model Catalog for DeepSeek Harness

Introduction

The built-in opencode-go route of DeepSeek Harness (DSH) relies on a static catalog within @earendil-works/pi-ai and does not update automatically. When the upstream dependency is not updated, new models (such as Step 5 or Cat Jam) will not appear in the model selector.

The dsh-opencode-go-catalog plugin solves this problem by maintaining three protocol-separated sibling routes. It never touches the built-in opencode-go route but manages the three routes opencode-go-extras, opencode-go-responses, and opencode-go-messages via the settings.mutate interface. The model list is rebuilt from the live roster and docs interface without manual intervention.

Core Features

  • Real-time Catalog Maintenance: Fetches the latest status from https://models.opencode.ai/api.json (registry) and https://opencode.ai/zen/go/v1/models (roster).
  • Protocol-Separated Routes: Divides models into three categories by protocol to avoid 500 or 401 errors caused by protocol mismatches.
    • opencode-go-extras: Uses the openai-completions protocol.
    • opencode-go-responses: Uses the openai-responses protocol.
    • opencode-go-messages: Uses the anthropic-messages protocol.
  • Auto-sync and Snapshots: Supports the /opencode-go-sync command for forced synchronization and retains a curated snapshot as an offline fallback.
  • Fault Tolerance: Automatically switches to snapshot mode when source data is unavailable or the number of models falls below a safety threshold, ensuring the model selector is never left empty.

Installation and Activation

This plugin requires manual installation.

  1. Copy the plugin folder to the DSH configuration directory:
    cp -r dsh-opencode-go-catalog <profile>/node_modules/dsh-opencode-go-catalog
  1. Edit the package.json in the configuration directory and add the plugin name to dsh.profile.bundles:
    {
      "dsh": {
        "profile": {
          "bundles": [
            "dsh-opencode-go-catalog"
          ]
        }
      }
    }
  1. Restart DSH.

Configuration Instructions

Configure the plugin in cordis.patch.yml to control synchronization behavior and route lists. This is a whole replacement (not a deep merge), so all fields must be included:

- id: opencode-go-catalog
  name: dsh-opencode-go-catalog
  config:
    enabled: true            # Removes sibling routes if false
    autoMembership: true     # If false, only uses snapshot, does not query roster/docs
    minAutoModels: 8         # Safety threshold: use snapshot if below this number
    minProtocolRows: 10      # Safety threshold: prevents empty routes due to docs redesign
    minAutoRatio: 0.6        # Safety threshold: retention ratio of the last adopted set, 0 disables
    refreshReasoning: true   # If false, only uses snapshot reasoning values, disables auto mode
    sessionHeaderValue: 'dsh-opencode-go-catalog'  # Adds a static session header
    intervalMinutes: 240     # 0 means sync only at startup
    startupDelaySeconds: 10
    refreshTimeoutMs: 120000
    catalogPath: ./catalog/models.json
    managedRoutes:
      - opencode-go-extras
      - opencode-go-responses
      - opencode-go-messages

Common Commands and Scripts

Manage the catalog status via chat commands or script files.

Chat Commands
* /opencode-go-sync: Rewrite the model list immediately from live sources.

Script Files
* node bin/sync.mjs: Default mode, reports field differences, new/dead model IDs, but does not write to the file.
* node bin/sync.mjs --auto: Preview output in auto mode (additions, removals, unresolved items).
* node bin/sync.mjs --adopt: Write live members to the snapshot (preserving the current fallback snapshot).
* node bin/sync.mjs --write: Rewrite snapshot fields from the registry and mark the date.

Notes

  • Manually Added Models are Not Persistent: Models added manually to the three routes in the settings interface will be overwritten or deleted during the next sync (startup, scheduled, or command-triggered). For persistence, use the --adopt command to write to the snapshot or use an exclusion list.
  • Runtime Environment: The plugin runs with the permissions of the current DSH process. Please check the source code and license (MIT) before installation.
  • Dependency Requirements: Ensure DSH is running and a valid OPENCODE_GO_API_KEY is configured (availability of the built-in route indicates correct configuration).

Summary

dsh-opencode-go-catalog provides dynamic OpenCode Go model catalog management capabilities for DSH, solving the pain point of the built-in static catalog’s inability to update. Through protocol separation and snapshot fallback mechanisms, it ensures the real-time nature and stability of the model list without interfering with existing routes. The plugin source code and documentation are available on GitHub.

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

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

Xiaoye