前言¶
在 DeepSeek Harness(DSH)裏使用 OpenRouter 時,模型列表通常寫在 profile 的 provider 配置裏。OpenRouter 側「當前免費」的模型會變動,若只靠手工改 patch,列表容易滯後,選模型時也可能和 OpenRouter 實際可用集合不一致。
dsh-openrouter-sync 由社區維護者 bosenok 發佈,歸類爲聯網工具,作用是把 DSH 裏 openrouter provider 的模型列表與 OpenRouter 當前免費模型保持同步。下面介紹它的定位、安裝方式以及使用時的前提條件。
這是什麼¶
dsh-openrouter-sync 是 DeepSeek Harness 插件,以 DSH bundle 形式打包:package.json 聲明 dsh.bundle.patch,cordis.patch.yml 會在當前啓用的 profile 中插入 openrouter-sync 相關配置。
插件簡介(與倉庫 README 一致):Keep the DSH openrouter provider model list in sync with OpenRouter’s currently-free models.
當前 package 版本爲 0.1.0,要求 DSH 版本 >=0.2.1-rc.2 <0.3.0。許可證爲 MIT。
核心功能¶
根據倉庫說明,該插件爲 僅 host 側 邏輯:
- 每 六小時 拉取 OpenRouter 當前免費模型信息,並重寫當前 profile patch 裏
openrouterprovider 的 models 列表。 - 運行中的 DSH 應用可通過 HMR 重新組合 profile,無需爲改列表而手動重啓(啓用 bundle 時文檔仍建議:HMR 會應用到運行中的 app,重啓 可確保 client 半部分也被正確重建)。
除上述同步外,插件不引入單獨的「業務配置項」;能否完成聯網同步,取決於你是否已配置 OpenRouter 與 API Key(見下一節)。
安裝與啓用¶
安裝命令須使用 README 中的寫法,按你的使用場景選擇一種即可。
桌面應用
在 Plugins 頁面安裝 github:bosenok/dsh-openrouter-sync。若倉庫爲私有,需先讓本機具備 git 訪問權限,安裝後 啓用 bundle。
CLI(指定 profile)
dsh plugin --profile <profile> add github:bosenok/dsh-openrouter-sync
本地目錄
dsh plugin --profile <profile> add file:/path/to/dsh-openrouter-sync
啓用 bundle 後插件纔會掛載;HMR 會對運行中的應用生效。
關於 desktop profile 的說明
對應用託管的 desktop profile,執行 dsh plugin --profile desktop add 只會安裝依賴並複製包,不會像普通 profile 那樣自動啓用 bundle。需要任選其一:
- 在
~/.dsh/profiles/desktop/package.json裏把包名加入dsh.profile.bundles; - 或在桌面端的 Plugins 頁面啓用。
其他 profile 在安裝後一般會 自動啓用 已安裝的 bundle。
API Key 與 OpenRouter 配置¶
同步依賴訪問 OpenRouter。host 側解析 OPENROUTER_API_KEY 的順序爲:
- Harness 憑證服務;
- 進程環境變量;
~/.dsh/.credentials.yaml。
若沒有 Key,在 provider 已按常規方式配置的前提下,仍可能列出該 provider 的模型,但 同步步驟會被跳過。除配置 OpenRouter provider 或在憑證存儲 / 環境層提供 OPENROUTER_API_KEY 外,README 未要求額外插件專屬配置。
適用場景與注意¶
適合誰
- 已在 DSH profile 中使用
openrouterprovider,並希望 models 列表定期對齊 OpenRouter 當前免費 模型,減少手工維護 patch 的工作。
使用前請知悉
- 插件以 當前 dsh 進程的權限 運行,會週期性聯網並重寫 profile patch;安裝前建議閱讀 GitHub 倉庫 源碼與 MIT 許可證。
- 社區插件目錄 SkillHub 上的條目 與 DeepSeek / 幻方無官方從屬關係,DSH 生態奉行「一切皆插件」,本文信息以倉庫 README 與 package 元數據爲準。
結尾¶
dsh-openrouter-sync 把「OpenRouter 當前免費模型」與 DSH 裏 openrouter provider 的 models 列表綁在一起,用定時同步和 HMR 減輕手工改列表的負擔。需要進一步瞭解分類與簡介時,可查看目錄頁;安裝與行爲細節以 GitHub 爲準。
- 目錄頁:https://www.skillhub.cn/plugins/bosenok/dsh-openrouter-sync
- GitHub:https://github.com/bosenok/dsh-openrouter-sync