Introduction

DeepSeek Harness (DSH) supports extending model inference capabilities through plugins. When developers use free models, they often encounter server-side gating issues: direct requests to OpenCode Zen free models are rejected with 403, and requests must be initiated through a real OpenCode process. This plugin runs the official OpenCode binary in an isolated environment and provides an OpenAI-compatible endpoint, solving this direct-connection problem.

What Is This

This plugin integrates OpenCode free models (big-pickle, LongCat, MiMo, Nemotron, Space Bunny, etc.) into the DSH model selector. These models are displayed under the opencode-xdbridge group. It also provides a visual interactive panel under Settings → OpenCode-XD.

Core Features

  • Model Integration: Integrates OpenCode free models into the DSH model selector.
  • Visual Panel: Provides status monitoring and interaction entry points under Settings → OpenCode-XD.
  • Runtime Management: Downloads and runs the official OpenCode binary, supporting automatic download, resumable transfers, and integrity checks.
  • Endpoint Conversion: Provides local OpenAI-compatible endpoint conversion.
  • Status Monitoring: Provides status metrics and a model details panel.
  • Security Isolation: No local action execution (permissions are intercepted) and an isolated runtime environment.
  • Availability Detection: Supports model availability detection, classified as unstable (timeout/rate limiting) and unavailable (authentication/quota).
  • Automatic Compression: Automatically compresses context length to prevent invalid requests.

Installation and Enabling

  1. Ensure the environment meets the dependencies: Node.js (>=22.19.0 or >=24.0.0) and DSH (>=0.1.1-rc.1) are required, along with dependencies such as @deepseek-ai/cordis and @deepseek-ai/dsh-llm.
  2. Run the installation command:
    dsh plugin --profile <profile> add dsh-opencode-xdbridge
  1. Restart DSH.

Typical Usage

  1. Use a model: After restarting, find the opencode-xdbridge group in the model selector and select a model directly to start chatting.
  2. Management panel: Open the interactive panel under Settings → OpenCode-XD to view service status, the model list, and details.
  3. Configure paths: In settings.yaml, configure dataDir, binaryPath, or runtimeVersion, or use the environment variable OPENCODE_BINARY_PATH to specify the runtime path.

Applicable Scenarios and Notes

  • Permission requirements: The runtime requires {'*':'ask'} permission, and the plugin rejects all approval requests locally, only allowing forwarding to DSH.
  • Context handling: The plugin does not directly report the model’s original context window; instead, it reports an available budget: (declared window - output reserve) * (1 - 15% safety margin). This helps DSH trigger compression earlier and avoids invalid requests caused by an oversized window.
  • Download and caching: The first startup downloads about 57 MB of runtime (cached), with resumable transfer support.
  • Failure classification: Detection failures are classified as “unstable” (timeout/rate limiting, retained in the list) and “unavailable” (authentication/quota, removed) to avoid incorrectly removing available models due to occasional timeouts.

Ending

This plugin bridges the official runtime to enable DSH users to access OpenCode free models and provides a set of visual management tools. The complete source code and documentation are available on GitHub.