Foreword

DeepSeek Harness (DSH) extends functionality through a plugin mechanism. For the OpenCode Zen model list, official documentation only provides IDs, lacking metadata such as context windows and output limits, and the list changes dynamically. Manual maintenance can easily lead to outdated or incorrect configurations. The dsh-opencode-models plugin is used to fetch the real-time model list from opencode.ai, compare it with local configuration, and support adding, deleting, and syncing via tools or the settings page.

Installation

Install the plugin via the command line:

dsh plugin --profile web add github:wyouwd1/dsh-opencode-models

Core Features

This plugin provides the following capabilities:

  • Fetch and Compare: The oc_model_status tool fetches the real-time model list by route and reports the difference between the configured count and the online count.
  • Add Models: The oc_model_add tool is used to add model entries. If a context window or maximum token count is not provided, the plugin automatically assumes contextWindow: 128000 and maxTokens: 32000.
  • Delete Models: The oc_model_remove tool is used to remove configured model IDs from a route.
  • Sync Drift: The oc_model_sync tool is used to preview and apply drift, or to clean up outdated/removed models.
  • Web Interface Management: A fixed “OpenCode Models” area is displayed at the top of the settings page, supporting batch deletion and synchronization operations.

Typical Usage

  1. Check the difference between the current configuration and the online list:
    oc_model_status
  1. Add a new model (automatically applying default capacity):
    oc_model_add
  1. Sync drift and clean up outdated models:
    oc_model_sync apply pruneStale

Configuration and Notes

  • No Configuration Required: The plugin does not require additional configuration keys. Routes follow the official OpenCode Zen endpoint layout, and authentication uses the existing apiKeyEnv (namely PI_AI_API_KEY).
  • Immediate Effect: Changes to the model list take effect immediately on the next request, without restarting the DSH process.
  • Default Capacity Assumptions: For unknown models, the plugin defaults to assuming contextWindow: 128000 and maxTokens: 32000. If the assumptions are incorrect, it can lead to performance degradation. Only specific free-tier model IDs (such as big-pickle and ox-alpha-free) are officially allowed.
  • Write Protection: Write operations on the settings page are protected by version control to prevent concurrent write conflicts.

Ecosystem Background

The DeepSeek Harness philosophy is “everything is a plugin.” This plugin is maintained by community developer wyouwd1, and is hosted on GitHub and the community directory.