Introduction¶
Developers using DeepSeek Harness (DSH) often encounter issues such as protocol incompatibility, missing session headers, or difficulties filtering reasoning data when integrating with OpenCode Zen or Muse models. Directly modifying node_modules is risky and results in high maintenance costs. This article introduces a community-maintained standalone plugin designed to resolve these compatibility issues.
Plugin Overview¶
This is a standalone Cordis plugin for DeepSeek Harness, maintained by dooooling. It provides a solution for the session formats required by OpenCode Zen requests, client version headers, and compatibility handling for Muse reasoning echo-back. The plugin operates independently without relying on build scripts and does not provide models, API keys, or quota.
Core Features¶
- Session and Header Handling: Provides session formats and client version headers for OpenCode Zen requests, supporting the conversion of session IDs and the generation of request IDs.
- Muse Compatibility: Handles Muse reasoning echo-back compatibility by stripping encrypted reasoning content from Muse Responses requests.
- Protocol Support: Supports the
openai-responsesprotocol. - Free Tier Completion: Supplements compatibility tool declarations for the free tier (e.g., bash, edit, glob).
Installation and Activation¶
Installation:
Please stop any running DSH instances before installation. Use the following commands to install the specified version:
dsh plugin --profile web add github:dooooling/dsh-opencode-compat#v0.1.3
dsh web
Provider Configuration:
In the llm-pi-ai provider configuration, Muse must utilize the openai-responses protocol with the correct baseURL and model ID set. Existing provider configurations will remain valid.
llm-pi-ai:
providers:
opencode-muse:
apiKeyEnv: OPENCODE_API_KEY
api: openai-responses
baseURL: https://opencode.ai/zen/v1
models:
- id: muse-spark-1.3-contributor-free
Activating Plugin Features:
Identity headers, reasoning, and free tier compatibility handling are enabled by default. For customization, add override configurations to ~/.dsh/profiles/web/cordis.patch.yml (merge with existing content):
- id: opencode-compat
config:
enabled: true
clientVersion: 1.18.31
rewriteClientHeaders: true
stripMuseReasoning: true
completeFreeTierFingerprint: true
Scope and Limitations¶
- Scope of Operation: Processes only HTTPS POST requests to
opencode.ai, restricted to pathsresponses,chat/completions, andmessagesunder/zen/v1/or/zen/go/v1/. It wrapsglobalThis.fetchglobally, affecting all matching requests within the same DSH process. - Dependencies and Permissions: The package contains executable ESM directly, requiring no prepare/build scripts. The plugin does not read credential files, log request bodies or keys, or modify model lists and default models.
- Precautions: This is a community compatibility solution, not an official plugin by DeepSeek or OpenCode. Client identity headers will be modified to the configured version; upstream services may change validation rules or reject third-party usage. The plugin does not guarantee free quota, regional availability, or access scopes permitted by terms of service.
- Compatibility Verification: Reasoning filtering is performed only on JSON Muse Responses requests. Adapters that capture old fetch references, use independent HTTP clients, or explicitly customize fetch may bypass the plugin. Full compatibility for DSH multi-turn tool execution has not yet been verified.
Summary¶
By utilizing an independent patch, this plugin lowers the barrier to integrating OpenCode Zen, primarily addressing session header and protocol compatibility issues. Developers should configure settings based on actual requirements and stay attentive to protocol changes in upstream services.