DeepSeek Harness 插件

dsh-llm-opencode

OpenCode Zen provider adapter for DSH harness LLM seam(英文原文)

跳到安装方式

来源信息

GitHub 仓库
bobowsh/dsh-llm-opencode
最近更新
2026年8月20日
分类
工具与能力
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/bobowsh/dsh-llm-opencode
插件名:dsh-llm-opencode
作者:bobowsh

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-llm-opencode

![npm version](https://www.npmjs.com/package/dsh-llm-opencode) ![License: MIT](https://opensource.org/licenses/MIT) ![DSH Plugin](https://github.com/topics/dsh-plugin)

OpenCode Zen free model provider adapter for DeepSeek Harness (DSH).

Registers the opencode-zen provider route in DSH's LLM seam, giving your coding agent access to OpenCode Zen's free-tier models — no API key required for free models, no credit card, no setup friction.

Free Models

ModelIDContextMax OutputNotes
DeepSeek V4 Flash Freedeepseek-v4-flash-free200K128KDeepSeek's V4 Flash, SWE-bench ~79%
Nemotron 3 Ultra Freenemotron-3-ultra-free1M128KNVIDIA's flagship, huge context
MiMo V2.5 Freemimo-v2.5-free200K32KXiaomi's coding model
Big Picklebig-pickle200K128KStealth general-purpose model

> Free models are served through OpenCode Zen's public gateway. Availability may change; the adapter auto-discovers models tagged free from the /models endpoint.

Install

# From npm (prebuilt, recommended)
dsh plugin --profile web add dsh-llm-opencode

# Or from GitHub directly
dsh plugin --profile web add "github:bobowsh/dsh-llm-opencode#main"

Quick Start

1. Install the plugin into your DSH profile (see above). 2. Open DSH Web Settings → Models → select OpenCode Zen as your provider. 3. Pick a free model (e.g. deepseek-v4-flash-free) and start coding — no API key needed.

> Paid models require an API key. Set OPENCODE_API_KEY in DSH credentials (Settings → Credentials) or as an environment variable.

How It Works

This plugin implements the LlmAdapter interface from @deepseek-ai/dsh-llm and registers a single provider route opencode-zen. When DSH routes a request to this provider:

1. Serialization — harness messages are translated to OpenAI-compatible chat completions (text-only; images are rejected with UNSUPPORTED_CONTENT). 2. Streaming — SSE responses are parsed via eventsource-parser and translated into harness StreamChunk events (block-start, text-delta, reasoning-delta, tool-call-delta, usage, finish). 3. Identity — requests carry User-Agent: opencode/1.0.0 and related headers to satisfy OpenCode Zen's client identity check (the default deepseek-harness/... user-agent is rejected by the gateway). 4. Credentials — resolves the API key from DSH's credential store (env var OPENCODE_API_KEY) or the ambient environment. Free models work without a key; paid models require one. 5. Model discovery — registers a discovery handler that fetches /models from the gateway and filters for free-tagged entries.

Configuration

The adapter is configurable through DSH's settings system (llm-opencode section in settings.yaml). Changes take effect immediately without restart.

SettingDefaultDescription
baseURLhttps://opencode.ai/zen/v1Gateway endpoint
apiKeyEnvOPENCODE_API_KEYCredential store key for the API token
maxTokens128000Default max output tokens per request
defaultContextWindow1000000Fallback context window for unknown models
streamIdleTimeoutMs300000Max idle time (ms) before stream is considered dead
models(built-in catalog)Override the model catalog
retryPolicy(built-in)Retry behavior for transient errors

Example settings.yaml snippet

llm-opencode:
  baseURL: "https://opencode.ai/zen/v1"
  maxTokens: 64000
  models:
    - id: deepseek-v4-flash-free
      name: DeepSeek V4 Flash Free
      contextWindow: 200000
      maxTokens: 128000

See [settings.example.yaml](settings.example.yaml) for a full annotated example.

Bundle Patch

The included cordis.patch.yml registers the llm-opencode plugin row into the DSH bundle loader, so the plugin is auto-loaded when installed into a profile.

Development

npm install
npm test
npm run lint

Requirements

  • DeepSeek Harness >= 0.1.0-rc.7
  • @deepseek-ai/cordis ^4.0.1 (peer dependency)

License

MIT © bobowsh