xiaobbl/dsh-opencode-go-model-list

Plugin插件 Native原生 ⭐ 6 MIT Migration & Compatibility迁移与兼容

Keeps the harness's own opencode-go provider route on the model list opencode Go actually serves — no second provider, no settings.yaml edits, no credential handling, and no shipped model overwritten.

catalog descriptioncatalog 简介 / catalog description:修复dsh上opencode go模型列表问题

Project Overview项目介绍

xiaobbl/dsh-opencode-go-model-list is a native DSH plugin that extends the built-in opencode-go provider model catalog in DeepSeek Harness. It adds new models that are currently offered by OpenCode Go but not included in the default DSH snapshot. You can install it via the standard dsh plugin command, either by linking the local project folder or adding a packed local file. The package declares the required dsh.bundle.patch field, so a single command handles dependency installation, node_modules setup, and bundle registration automatically. It operates by injecting new models directly into DSH's existing catalog system.

This plugin addresses common issues users face when manually adding new OpenCode Go models to DSH. Editing the full provider models configuration replaces the entire existing catalog, requiring users to re-add all existing model entries just to add one new model. Using model overrides only works for existing model IDs and cannot add brand new models that are not already in the catalog. Creating a custom provider route breaks compatibility with existing DSH plugins for session management and cost tracking, so those plugins will not recognize the new route or any models added to it.

The plugin is released under the open source MIT license, and has no extra external dependencies beyond what DSH already provides. It fetches the latest model list from the public OpenCode API and pulls model metadata like context limits and pricing from models.dev, by default refreshing every six hours. It caches the resulting catalog in DSH's cache directory, so if network access fails on first run or later, DSH will fall back to the last cached version or the original shipped catalog. Shipped models are never overwritten unless you explicitly enable the updateExisting configuration option, and uninstalling the plugin fully restores the original catalog.

这是一款专为 DeepSeek Harness 开发的原生插件,用于扩展 DSH 内置 opencode-go 提供商的模型列表,动态添加当前 OpenCode 服务支持但未纳入 DSH 默认快照的新模型。它无需用户手动编辑 settings.yaml 配置文件,不会覆盖已预装的现有模型,也不会创建新的自定义路由,所有新增模型直接接入 DSH 原生目录系统,可被原有计费、会话等插件正常识别。

它解决了手动配置新增 OpenCode 模型时的各类痛点:如果直接修改 providers 配置会覆盖整个现有预装目录,modelOverrides 规则无法加入全新的模型 ID,自定义路由又不能被原有计费、会话插件正常识别。这个插件直接将新模型注入现有目录,让新模型获得和预装模型完全一致的处理体验,适合需要使用 OpenCode 最新大模型、不想做复杂手动配置的 DSH 用户。

它采用 MIT 许可开源,无需额外依赖,可通过标准的 dsh plugin 命令完成安装。它会默认从 OpenCode 官方端点和 models.dev 获取最新模型信息和元数据,默认每 6 小时自动刷新一次,结果缓存到 DSH 缓存目录。首次运行需要网络访问,若获取失败则保留原有模型列表不变,插件不会修改原有配置,卸载后可完全恢复。

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 github:xiaobbl/dsh-opencode-go-model-list

把 xiaobbl/dsh-opencode-go-model-list 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

English 简体中文

dsh-opencode-go-model-list

Keeps the harness's own opencode-go provider route on the model list opencode Go actually serves — no second provider, no settings.yaml edits, no credential handling, and no shipped model overwritten.

  • Before: the opencode-go route lists 27 models (pi-ai's shipped snapshot)
  • After: the same route lists 38 — adding deepseek-v4.1-flash, kimi-k2.5, grok-4.5, glm-5, qwen3.5-plus, mimo-v2-pro/omni, minimax-m2.5, deepseek-flash, hy3-preview, union-alpha

The problem it closes

When opencode ships a model the harness snapshot predates (for example deepseek-v4.1-flash), the route cannot serve it, and adding it by configuration fails:

llm-pi-ai: provider "opencode-go" model "deepseek-v4.1-flash" needs an api; the installed
catalog does not describe it, so set the route's api to the wire protocol its endpoint speaks

Every configuration path has a cost — see discussion #6464:

Path Cost
providers.opencode-go.models replaces the route's whole catalog (all 27 shipped models), and every entry must restate api/baseURL
modelOverrides only reshapes ids the catalog already describes; a new id is refused
a custom route is not the built-in opencode-go, so balance/cost/session plugins no longer recognize it

This plugin takes the third path: it contributes into the catalog itself, so a new model becomes a shipped model.

How it works

  1. Catalog contribution — missing models are added to pi-ai's opencode-go catalog object (MODELS['opencode-go']), which is exactly what dsh-llm-pi-ai reads while resolving the route (getBuiltinModels('opencode-go')). Settings surfaces, model validation, and request resolution therefore treat them as built-ins.
  2. Collection patch — the pi-ai model collection's getModels is wrapped so a route that already resolved still sees entries that arrive later. A background refresh lands in the model picker and the request path without a restart.
  3. Cache — a successful fetch is written to $DSH_HOME/cache/opencode-go-model-list/catalog.json, adopted synchronously on the next boot, and refreshed in the background. Offline hosts keep the last good list.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-resume 下一个 Next dsh-web-attention-badge →