jiesou/dsh-opencode-zen-free-provider 预览 preview

jiesou/dsh-opencode-zen-free-provider

OpenCode Zen免费模型接入DeepSeek Harness。1M上下文,同步全部元数据。

Project Overview项目介绍

This is a DSH-native plugin that adds support for OpenCode Zen’s free large language models to the DeepSeek Harness platform. It can be installed two ways: either via the pre-built package from npm using the DSH CLI command dsh plugin --profile web add @jiesou/dsh-opencode-zen-free-provider, or directly from the GitHub repository with the command dsh plugin --profile web add github:jiesou/dsh-opencode-zen-free-provider. On first launch, the plugin syncs the full model catalog and metadata from OpenCode Zen and models.dev exactly once, no repeated polling, and it will load even if the initial sync fails.

After installation, no extra configuration is required to use the models. The plugin automatically filters and syncs all available free models on launch, so you just need to navigate to DSH’s Web Models page, select the OpenCode Zen Free provider and the model you want to use, and start generating completions. At the time of this writing, the MiMo V2.5 backend from OpenCode Zen supports a 1 million token context window, which works well for processing large documents or long prompts within DSH. This plugin is ideal for DSH users who want access to free LLM inference without paying for API access.

The plugin is released under the permissive MIT open source license, so it can be used and modified totally freely. It fixes a common issue where DSH mislabels non-authentication errors from OpenCode Zen (like expired free quota or regional restrictions) as invalid API keys, and preserves the original error message in the terminal for debugging. OpenCode’s free models are rate-limited based on your connecting IP address, and if you get frequent network errors for many specific models, you can enable a retry policy via a simple manual YAML configuration edit.

这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,作用是将 OpenCode Zen 提供的免费大语言模型接入 DSH 使用。插件启动时仅会从 OpenCode Zen 和 models.dev 同步一次模型目录与元数据,不做后续轮询,即便初始拉取失败也能正常挂载运行。支持通过 npm 预构建包或 GitHub 源码两种方式在 DSH 中安装,完全符合 DSH 的包管理规范。

安装完成后无需额外配置,插件启动时会自动同步并过滤所有可用的免费模型,用户只需要进入 DSH 的 Web Models 页面,选中 OpenCode Zen Free 分类和想要使用的模型,就可以开始调用推理。当前 MiMo V2.5 后端支持最长 1M 的上下文窗口,满足大文本处理需求。这个插件适合想要免费调用大模型做日常任务、又习惯使用 DSH 界面的用户使用。

本插件遵循 MIT 许可开源,可免费使用。它会修正 DSH 对 OpenCode Zen 错误状态码的误分类,在终端保留真实错误原因,方便用户排查问题。需要注意 OpenCode 的免费模型有基于 IP 的限流,遇到网络错误的模型可以手动配置重试策略解决问题。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 6 stars - very few users, little community feedback星标只有 6,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add @jiesou/dsh-opencode-zen-free-provider

把 jiesou/dsh-opencode-zen-free-provider 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-opencode-zen-free-provider

OpenCode Zen Free provider for dsh.

English

image

本插件可以将 OpenCode Zen 的免费模型接入 dsh 使用。插件启动时从 OpenCode Zen 和 models.dev 同步模型目录与所有元数据,仅抓取一次,不轮循。哪怕启动时拉取失败,插件也能正常挂载,路由以空目录提供服务。

其中 DeepSeek V4 Flash 额外支持到 1M 上下文。

更新:现在没有 DeepSeek V4 Flash 了 😭

现在 MiMo V2.5 后端额外支持到 1M 上下文。

安装

从 npm 安装(预构建产物,推荐):

dsh plugin --profile web add @jiesou/dsh-opencode-zen-free-provider

或从 GitHub 安装:

dsh plugin --profile web add github:jiesou/dsh-opencode-zen-free-provider

安装之后

模型列表无需任何配置,插件启动时会自动从远程同步并过滤所有免费模型。在 Web Models 页面选择 OpenCode Zen Free 和模型后即可开始使用。

推理深度(Reasoning effort)

模型只暴露上游接受的档位,不造档位。Default 表示"不发送 reasoning_effort"字段,由上游自行决定深度。Off 是真开关——发送上游的关闭字面值(none、off 等)。effort 配置为空或只有 toggle 的模型干脆不显示档位选择器。

错误提示

OpenCode Zen 把非凭证类拒绝(免费额度到期、区域限制等)以 HTTP 401/403 返回,dssharness 会把这些状态码归类为"API Key 无效"。本插件在终端错误事件里保留真实原因,让真因显示出来;真正的鉴权失败仍按 AUTH 走。无法解析的内容原样透传。

提示:OpenCode 的 Free 模型会被基于 IP 限流。

对于 Ox Alpha 等经常遇到"network errors"等问题的模型,建议手动设置:

- id: opencode-zen-free-provider
  name: '@jiesou/dsh-opencode-zen-free-provider'
  config:
    retryPolicy:
      mode: always
    maxRequestImageBytes: 2097152
    requestImageMaxBytes: 1048576
配置项 类型 默认值 说明
retryPolicy object 省略即用普通默认 模型请求重试策略
maxRequestImageBytes number 2097152(2 MiB) 单次请求允许内联的 base64 图片字节上限
requestImageMaxBytes number 1048576(1 MiB) 单张图片重编码后的字节上限

图片预算

Zen 这条 wire 是无状态的:每轮请求都要把历史重新发一遍,留在上下文里的图片因此每轮都会再传一次。

  • 每张图片先归一化(2048×2048 像素总预算),再重编码到 requestImageMaxBytes(默认 1 MiB)以内。
  • 一轮请求内联的 base64 图片总量超过 maxRequestImageBytes(默认 2 MiB)时,不发请求,而是抛出 IMAGE_OFFLOAD_REQUIRED 并报出需要 offload 的张数。DSH 据此把最旧的图片记入 image/offload 事件并重试;之后每轮用占位文本代替这些图片的字节,模型仍能从占位文本里读到图片身份和可读路径。
  • 已经 offload 的图片不再读取字节、不再编码、不再上传。

两个值都是 base64 口径(约等于原图字节 ×4/3)。默认组合约等于"一张整尺寸图 + 一张半尺寸图"。想让模型一次看更多图就调大,想省流量就调小;但 maxRequestImageBytes 必须大于单张的 base64 长度(1 MiB 图约 1.4 MB),否则一张图也放不下。

License

MIT

← 上一个 Prev create-dsh-plugin 下一个 Next dsh-prompt-optimize →