DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@aiwayds/dsh-model-sync

Model Sync

dsh 插件:让 llm-pi-ai 提供商路由的模型列表与 pi.dev 网关保持同步,并通过官方设置接口写入

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @aiwayds/dsh-model-sync@0.8.0
README兼容性版本

兼容性与来源证明

Model Sync 以 @aiwayds/dsh-model-sync 发布,当前版本为 0.8.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/11/4

版本

0.8.0stable
2026/10/17
0.7.0stable
2026/9/29
0.6.2stable
2026/9/25
查看其余 18 个版本收起版本
0.6.1stable
2026/9/25
0.6.0stable
2026/9/24
0.5.0stable
2026/9/17
0.4.1stable
2026/9/15
0.4.0stable
2026/9/11
0.3.1stable
2026/9/5
0.3.0stable
2026/9/3
0.2.3stable
2026/9/3
0.2.2stable
2026/9/3
0.2.1stable
2026/9/2
0.2.0stable
2026/9/1
0.1.6stable
2026/8/31
0.1.5stable
2026/8/29
0.1.4stable
2026/8/29
0.1.3stable
2026/8/28
0.1.2stable
2026/8/28
0.1.1stable
2026/8/19
0.1.0stable
2026/8/19

相关插件

正在加载相关插件…

最新版
0.8.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
407 kB
文件数
47
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 2
周下载
523
安全扫描
✓ v0.8.0 扫描通过
最近提交
2026/11/4
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Experimental Cot Translation Bundle@deepseek-ai/dsh-experimental-cot-translation-bundle扩展推理的实验性机器翻译Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Our Free Model@ebony-vinyl/dsh-our-free-modelOur Free Model — 在 dsh 里装上这个插件即可,无需登录、注册或填 API Key,就能使用包括 DeepSeek V4.1 Flash、Kimi K3 在内的前沿模型,桌面端另有 EAC 协付渠道;2.0 起接入 LobsterAI、Qoder、TRAE、Cline、Loomy、Raccoon、MiniMax、ZCode、Gemini 十个账号渠道(原有匿名免费通道保留)(登录、账号池、积分领取、本地 OpenAI 网关与局域网转发、数据看板与运行日志),六页毛玻璃界面统一呈现。Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编程套餐配额,并实时记录令牌使用情况;侧边栏 Settings 行上方显示紧凑的价格概览卡片

README

简体中文 | English

dsh-model-sync

· GitHub

A dsh (DeepSeek Harness) Cordis plugin that keeps the model catalog of your llm-pi-ai provider routes in step with the pi.dev gateway's model listing — written through the official settings seam (settings.mutate), with zero patches to dsh internals.

Requires dsh >= 0.2.0-rc.2 — this plugin targets the dsh RC/stable line only (CI and releases resolve the newest of the latest/next dist-tags at runtime). The alpha line is no longer supported. On dsh 0.1.7+ the settings document is the profile patch (settings.yaml is imported once and renamed); the plugin only ever writes through the official API, so it works unchanged on either shape.

https://github.com/user-attachments/assets/c3f9c8b1-ea5e-470c-b8a8-60a81fc5c20a

A live recording of a dsh session running /model-sync (MP4, 1.5× speed) — drop reasons, per-route sync statuses and the change report in action. More demos in the Demos issue.

Why

Model lists drift: providers ship new models, retire old ones, and adjust capabilities (contextWindow, input modalities, thinkingFormat, reasoning efforts). Keeping them in sync by hand is error-prone busywork. dsh-model-sync does it for you:

  • Add-only, change-only writes. New models from pi.dev are merged in, existing ones updated, and unchanged routes are left completely untouched — the writer compares against the raw user segment and skips a route when nothing changed (writer.ts, profilesEqual, reason: 'no-change').
  • No hand-maintained model lists. The pi.dev remote catalog is the source of truth for the managed routes; your settings (the llm-pi-ai provider profile) simply reflect it.
  • Scheduled refresh. An auto round runs shortly after startup and then on a configurable interval, so the catalog stays current without any interaction.

Features

  • pi.dev gateway sync. Fetches each managed route's model list from https://pi.dev/api/models/providers/<route> with ETag/304 revalidation and a persistent per-provider cache under ~/.dsh/models-store.json (remote-catalog.ts). Transient failures and aborts keep the last-good cache; a 404/501 treats the route as absent for the round.
  • Default routes. When managedRoutes is empty, these pi.dev routes are synced: opencode-go, zai-coding-cn, minimax-cn, xiaomi-token-plan-cn (DEFAULT_ROUTES in src/index.ts).
  • Two write modes (writeMode):
    • settings (default) — the zero-patch pipeline: fetch → translate → settings.mutate. Self-contained; never touches the settings document directly, only via the official settings API.
    • overlay (legacy, deprecated) — delegates to the patched dsh-llm-pi-ai adapter's piAiCatalog.refresh() and merges pi.dev entries in memory (requires the optional patch). dsh 0.2.1 removed the piAiCatalog seam outright (pi-ai 1.3.0 ModelsStore rework), so every overlay round now degrades to a notice — use the settings mode.
  • Scheduled refresh. intervalMinutes auto rounds (default 240 / 4h) plus a startupDelaySeconds initial delay (default 5); each round logs the same report a manual refresh produces. 0 disarms the interval (startup-only). The interval re-arms live when the config changes (src/index.ts).
  • Change reporting / diff. Every round reports added/removed model ids (diffModelIds), and in settings mode added/removed/changed entries against the current raw settings (diffEntries, diff.ts). Dropped and degraded entries are reported with their reasons.
  • modelSync service. Exposes a modelSync service (syncNow()) that a UI can call to force one refresh round and read the report.
  • /model-sync command. The plugin registers a /model-sync slash command itself through the shared dsh command registry (@deepseek-ai/dsh-commands), so every interactive UI lists it automatically — no UI-side wiring. Running it forces one sync round on the spot and prints the same report the scheduled rounds log; the sync scope is decided by (arguments are ignored). The registry is an optional peer: hosts without a command registry still get the scheduled rounds and the service.

Install

Requires Node ≥ 22.19 and a dsh profile. Install as a dsh plugin:

npm i @aiwayds/dsh-model-sync
dsh plugin add @aiwayds/dsh-model-sync

The package ships cordis.patch.yml (wired as dsh.bundle.patch), which mounts the plugin into the profile's assembly tree under the stable plugin id dsh-model-sync — on dsh 0.1.7+ that entry id doubles as the settings namespace for the plugin's Config schema.

This plugin ships standalone — install it explicitly with dsh plugin add @aiwayds/dsh-model-sync when you want it.

Uninstall

dsh plugin remove @aiwayds/dsh-model-sync

The host auto-cleans: the bundles entry is spliced out of the profile and the plugin's patch layer drops with the package, so the sync rounds and the /model-sync command simply stop. Three things intentionally stay on disk:

  1. ~/.dsh/models-store.json — back this file up before purging it. It holds the catalog cache plus your modelOverrides: under the store-first invariant the plugin folds overrides into the written models and unsets the settings key, so for a managed route the store can be the only copy of your override values. Deleting the file deletes them.
  2. Synced model lists in the settings document. The plugin wrote them into the host-owned llm-pi-ai namespace (providers.<route>.models) through the official settings seam (~/.dsh/settings.yaml up to dsh 0.1.6, the profile patch on 0.1.7+). They persist after removal and remain valid host config — dsh consumes them exactly as if you had written them by hand. Remove those entries by hand if you don't want them.
  3. A stale staging file, rarely. The store's writes go through a temp-file + rename; if a process died mid-write a ~/.dsh/models-store.json.<pid>.tmp file can remain. It is safe to delete.

Usage

Configure the plugin under the dsh-model-sync settings entry — on dsh 0.1.7+ the entry id (the same stable id the bundle patch always mounted) is the settings namespace; edit it in the settings UI or your profile patch. Every key is optional, and every key is a volatile field, so edits apply without restarting the plugin. Upgrading from a pre-0.1.7 install: a legacy top-level model-sync: section in the old settings.yaml is imported once into the new entry automatically at the next plugin boot (the audit record lands in ~/.dsh/storages/dsh-model-sync/legacy-import.json):

KeyDefaultDescription
writeMode'settings'Zero-patch pipeline; 'overlay' (deprecated since dsh 0.2.1) for the legacy patched-adapter mode
intervalMinutes240 (4h)Auto-refresh interval in minutes; 0 = startup-only
startupDelaySeconds5Delay before the first auto refresh, so the llm adapter is ready
refreshTimeoutMs120000Abort budget for one refresh round's network request (min 1000)
managedRoutes[]Routes to sync; empty = the default pi.dev routes
keepBuiltinOnlytrueKeep built-in-only models not present on pi.dev (smooth migration)
dropUnserviceabletrueDrop unserviceable entries; false aborts the route instead
syncNotifyfalseNotify on changes (logger + /model-sync report)
forceMaxReasoningEffortfalseForce max reasoning effort on models with a non-empty thinkingFormat
providerNativeFetchtrueUnion each mapped provider's first-party /models listing into the pi.dev result (additions only)
keepDeprecatedBuiltinfalseOpt back into emitting builtin ids the official default model list dropped (dsh 0.1.7 removed deepseek-v4-flash / deepseek-v4-flash-vision-exp; dsh 0.2.0 removed omen-alpha on opencode-go and glm-4.7 / glm-5-turbo / glm-5.1 / glm-5.2 / glm-5.2-highspeed / glm-5v-turbo on zai-coding-cn; the snapshot keeps the data but no longer syncs them by default)

Example (settings section dsh-model-sync; a legacy settings.yaml model-sync: section is not auto-imported by the dsh 0.1.7 host itself — the plugin recovers it once at boot, see above):

dsh-model-sync:
  writeMode: settings
  intervalMinutes: 30
  managedRoutes:
    - opencode-go
    - zai-coding-cn

The plugin writes to the llm-pi-ai namespace (providers.<route>.models) — the same document the adapter consumes — and only for the routes it manages. During migration, keepBuiltinOnly preserves models that exist in your installed built-in catalog but aren't on pi.dev yet.

Capacity values are upper limits, not your runtime settings

Synced contextWindow / maxTokens describe what the model accepts at most, as advertised by the gateway listing — not what your deployment is configured for. dsh resolves the settings-written value over the installed catalog, and a written maxTokens becomes the request-level default. Pointing a route at a local or proxied endpoint that serves a smaller context (vLLM / Ollama and friends) while carrying catalog-sized capacities is a known recipe for the "output token limit reached" family of failures.

If you need a model to run under a smaller budget, set it in modelOverrides under the same route — the sync folds the fields into the synced list and re-applies them from its store every round:

providers:
  zai-coding-cn:
    modelOverrides:
      glm-5.3:
        contextWindow: 32768

Note that listing data itself can be noisy: values are sanity-gated (positive integers; maxTokens strictly below contextWindow), and stripped values show up in the sync report as DEGRADED lines with reasons.

Manual refresh: the /model-sync command

Type /model-sync in any interactive UI to force one sync round on the spot. The plugin registers the command in the shared command registry (@deepseek-ai/dsh-commands), and UIs discover it automatically. It returns the same report the scheduled rounds log. The sync scope is decided by managedRoutes; any arguments typed after the command are ignored. Hosts without a command registry degrade gracefully — the scheduled rounds and the modelSync service keep working.

Development

npm run build   # tsc → lib/
npm run check   # tsc --noEmit typecheck
npm test        # node --test (pretest builds): diff / translate / writer / remote-catalog / serviceability / command

Tests use per-route pi.dev fixtures under test/fixtures/ and temp directories for the models store — they never touch the real ~/.dsh.

Utility scripts under scripts/:

  • generate-builtin-snapshot.mjs — regenerate src/builtin-catalog-snapshot.ts from the installed @deepseek-ai/dsh-llm-pi-ai catalog (--generate for dev, --check for CI). Hand-maintained deprecated: true marks (ids the official default model list dropped) are preserved by id across regenerations.
  • verify-no-patch.mjs — exits non-zero if any installed dsh-llm-pi-ai still carries the overlay patch signatures (withRemoteCatalog / piAiCatalog).
  • backup/backup-patched.mjs — back up a patched dsh-llm-pi-ai/lib/index.js to backups/.
  • backup/restore-official.mjs — restore the official unpatched dsh-llm-pi-ai/lib/index.js from npm, validated against the patch (--dry-run supported).

The repo also carries the reference patches that document the legacy overlay behavior: docs-dsh-llm-pi-ai.patch (pi.dev remote-catalog overlay for dsh-llm-pi-ai) and docs-dsh-llm-pi-ai-compat.patch (supportsDeveloperRole compat passthrough).

License

MIT.

managedRoutes
modelSync
  • Translation rules. pi.dev entries are translated into settings-writable model profiles (translate.ts): base-matching vs base-less classification, reasoningEfforts derivation (S2 gate), compat gating to openai-completions (S5 gate), maxTokens handling, and drop logic for mixed-protocol routes. Capacity values get a sanity gate: a contextWindow that is not a positive integer, or a maxTokens that is not a positive integer strictly below the context window (listings sometimes echo the context window into maxTokens), is skipped with a degrade warning instead of written.
  • Your overrides are durable. modelOverrides is your own per-model channel (think levels, narrowed context windows). dsh refuses a models list beside non-empty overrides, so the sync folds your fields into the written models, clears the key in the same write, and re-applies the values from its store (~/.dsh/models-store.json) on every round — they keep winning over the synced values for as long as the route is managed.
  • Safe-by-default options:
    • keepBuiltinOnly: true — keep built-in catalog models that are not (yet) on pi.dev, so adopting the sync doesn't delete models you already use.
    • dropUnserviceable: true — drop unserviceable entries and continue; set to false to abort the whole route instead of writing a partial list.
    • forceMaxReasoningEffort — force models with a non-empty thinkingFormat to max reasoning effort (ensures reasoningEfforts contains max and forces compat.supportsReasoningEffort = true on openai-completions).
  • First-party listings, unioned in (providerNativeFetch, default on). pi.dev lags the providers, so every mapped route also fetches the provider's own OpenAI-shaped GET /models listing and unions it in: DeepSeek, Moonshot/Kimi (moonshotai, moonshotai-cn, kimi-coding), Zhipu (zai, zai-coding-cn), and Xiaomi MiMo (xiaomi, xiaomi-token-plan-cn/ams/sgp; api-key header auth). The merge is additions-only — ids pi.dev already carries keep pi.dev's metadata, listing-only ids enter as minimal entries. Unknown capacities are simply not written (contextWindow only when the listing states one, e.g. Moonshot's context_length; maxTokens never), so the route's defaultContextWindow / defaultMaxTokens apply. A failed listing fetch degrades to the pi.dev result and never loses models; providerNativeFetch: false restores the pi.dev-only behavior.
  • Conflict-safe writes. Writes carry the settings revision and retry once on SETTINGS_CONFLICT (writer.ts).