dsh-plugin-adapter: Directly Use OpenCode Zen Models in DSH

Preface

One of the core design philosophies of DeepSeek Harness (DSH) is “Everything is a Plugin.” When performing model inference with DSH, connecting to external models typically requires API keys, account registration, or maintaining additional processes. dsh-plugin-adapter solves this problem by registering OpenCode Zen’s anonymous free-tier models as native DSH LlmAdapters, making these models directly available in the DSH model selector without keys or registration.

What is it

dsh-plugin-adapter is a plugin for DeepSeek Harness designed to directly integrate OpenCode Zen’s free model resources.

  • Core Value: Free OpenCode Zen models, natively inside DSH (DeepSeek Harness). No API key. No registration. No extra process.
  • Maintainer: 1624318455
  • Problem Solved: Bypasses the key management and processes required for traditional external API integration by utilizing Zen’s anonymous free tier for inference.

Core Features

The plugin provides the following capabilities:

  1. Zero Credentials, Zero Setup: Directly uses OpenCode’s anonymous free tier without requiring API Key configuration.
  2. Native Adapter: Registered as a native DSH LlmAdapter, relying on no Sidecar processes or local ports.
  3. CLI-like Emulation: Request headers match the OpenCode CLI (e.g., User-Agent and session identifiers), ensuring requests meet upstream requirements.
  4. Selectable Thinking Levels: Supports thinking intensity selection (Off/Minimal/Low/Medium/High), configurable within the DSH model selector.
  5. Live Catalog & Fallback: Provides a live model catalog with a fallback chain, supporting self-healing mechanisms.
  6. Error Handling: Capable of returning upstream errors (such as rate limiting, authentication, and timeouts) to DSH with clear categorization.

Installation & Activation

Install using the official command:

dsh plugin --profile web add github:1624318455/dsh-plugin-adapter

After installation, restart dsh web and open the model selector to see available models in the zen-free group.

Typical Usage

The default configuration is ready to use. For adjustments, you can override the configuration in the corresponding Profile’s cordis.patch.yml:

- id: opencode2dsh
  name: '@memef1f1y/dsh-plugin-adapter'
  config:
    mode: adapter        # Use native adapter mode
    providerId: zen-free # Provider name displayed in DSH

Scenarios & Notes

  • Environment Requirements:
    • DeepSeek Harness (DSH) must be running with the Web Profile enabled.
    • Node.js ≥ 20 must be installed on the system.
    • Outbound HTTPS connectivity to opencode.ai and models.dev is required.
  • Notes:
    • The Sidecar mode is a legacy mode and is not included in the published plugin package. To use Sidecar mode, you must build legacy/agent yourself.
    • The plugin runs with the permissions of the current DSH process; it is recommended to review the source code and license before installation.

Summary

Through native adaptation, dsh-plugin-adapter allows DSH users to seamlessly access OpenCode Zen’s free inference capabilities. It simplifies the integration process while providing robust error handling and model catalog management.

  • Project Homepage: https://github.com/1624318455/dsh-plugin-adapter
  • Plugin Directory: https://www.skillhub.cn/plugins/1624318455/dsh-plugin-adapter
羽毛球分组比赛记分
小程序二维码

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

Xiaoye