jiang12345-code/dsh-openrouter-free

OpenRouter 免费模型面板(DeepSeek Harness / DSH 持久插件)。特性:综合能力 1-5★ 分级标星 · 最优三优先排序 · 一键切换(会话级 + 全局双写,推理档自动预校验)。

catalog descriptioncatalog 简介 / catalog description:OpenRouter 免费模型面板 for DeepSeek Harness — 分级星标 · 一键切换 · 任务续跑友好

Project Overview项目介绍

dsh-openrouter-free is a persistent plugin built specifically for DeepSeek Harness (DSH), shipped as the npm package dsh-openrouter-free under a bundle-manifest and exposing a DeepSeek Harness plugin badge. It adds a "Free Models" tab to the DSH GUI session view that pulls the live zero-price model catalog from the public openrouter.ai /api/v1/models endpoint (10-minute in-memory cache, manual refresh available), then upserts each picked model into llm-pi-ai.providers.openrouter.models in settings.yaml and writes both the current session selection via the native sessionController.selectModel() and the global agent-default-model, so the change takes effect on the very next request without restarting DSH. Models are starred 1–5★ by overall capability, the top three are pinned to the top, and reasoning-effort tiers are pre-validated against each model to prevent UNSUPPORTED_REASONING_EFFORT failures.

Typical workflow: a DSH user opens the Free Models tab, clicks any row to install and switch that model immediately, and is prompted inline to fill in the OpenRouter API key when it is missing; a single action can also batch-install every free model into the selector. Synchronization preserves any hand-curated non-free entries such as stealth/ox-alpha finetunes untouched, so power-user customizations survive refreshes. The intended audience is DSH users who want maximum free-model coverage without manually editing YAML or hunting for current IDs.

Prerequisites are a pre-existing llm-pi-ai.providers.openrouter route in settings.yaml pointing at https://openrouter.ai/api/v1 plus the OPENROUTER_API_KEY environment variable; the listing fetch itself is key-less. Installation means copying the repository into ~/.dsh/profiles/web/node_modules/dsh-openrouter-free and appending dsh-openrouter-free to dsh.profile.bundles in that profile's package.json — host-side changes require restarting DSH, while client-only changes only need a hard reload. The license is MIT, CI is wired via GitHub Actions, and a small HTTP surface at POST /__orfree/api exposes free.list, current, model.use, sync.all, and free.remove for scripting and automation.

dsh-openrouter-free 是面向 DeepSeek Harness(DSH)的持久化插件,以 npm 包 dsh-openrouter-free 形式发布,遵循 bundle-manifest 规范。它在 GUI 会话视图新增"免费模型"标签页,调用 openrouter.ai 公开 API 实时拉取零单价模型清单(10 分钟缓存,可强刷),并把这些模型 upsert 进 settings.yaml 的 llm-pi-ai.providers.openrouter.models 路由条目,同时通过原生 sessionController.selectModel() 写入当前会话与全局默认 agent-default-model,下一次请求即可生效、无需重启。综合能力按 1–5★ 分级,最优三模型置顶,推理档位自动预校验以避免 UNSUPPORTED_REASONING_EFFORT 错误。

典型工作流:用户在 DSH 内点击任意免费模型行即可切换,并在 OpenRouter API Key 缺失时立即提示补填;一次点击还能把全部免费模型批量装入选择器。同步时所有非免费的手工精调条目(如 stealth/ox-alpha)保持原样。它面向既使用 DSH 又希望充分利用 OpenRouter 免费模型、又不想手改 YAML 的开发者。

依赖方面,要求本机 settings.yaml 已存在 llm-pi-ai.providers.openrouter 路由(baseURL 指向 openrouter.ai/api/v1)并配置环境变量 OPENROUTER_API_KEY;公开拉取清单无需密钥。安装方式为把仓库复制到 ~/.dsh/profiles/web/node_modules/dsh-openrouter-free,在 profile 的 package.json 中将包名追加到 dsh.profile.bundles,host 改动需重启 DSH,client 改动硬刷新即可。License 为 MIT,仓库提供 CI 与 POST /__orfree/api 的 HTTP API(free.list、model.use、sync.all、free.remove 等)。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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:jiang12345-code/dsh-openrouter-free

把 jiang12345-code/dsh-openrouter-free 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-openrouter-free

CI DeepSeek Harness npm

OpenRouter 免费模型面板(DeepSeek Harness / DSH 持久插件)。特性:综合能力 1-5★ 分级标星 · 最优三优先排序 · 一键切换(会话级 + 全局双写,推理档自动预校验)。

自动拉取 openrouter.ai 的实时免费模型清单(输入/输出单价均为 $0),一键安装进本机 openrouter 路由并设为当前对话模型——免去手动编辑 settings.yaml 配置模型的麻烦。

功能

  • 免费清单面板:GUI 会话视图新增「免费模型」标签页,实时列出 OpenRouter 全部免费模型(名称 / ID / 上下文窗口 / 是否支持图片与推理),10 分钟内存缓存,可手动强刷。
  • 一键切换(会话级 + 全局双写):点击任意行 → 该模型被 upsert 进 llm-pi-ai.providers.openrouter.models,同时经原生 sessionController.selectModel() 写入当前会话的模型选择并更新 agent-default-model。下一次请求即生效,无需重启(对有请求历史的会话,只改全局默认不够——三层优先级 pending→lastUsed→default 会压住它)。
  • 推理档自动预校验:切换时从高到低试选该模型真正支持的档位(low/medium/high);不支持推理的模型自动摘掉 reasoningEffort,避免请求以 UNSUPPORTED_REASONING_EFFORT 失败。
  • 凭据面板:内置 OpenRouter API Key 设置入口,缺密钥时直接提示补填。
  • 全部装进选择器:一次把所有免费模型写入路由,之后也能用 DSH 自带模型选择器切换。
  • 安全保留手工条目:同步/切换单个模型时,所有非免费的手工条目(如 stealth/ox-alpha 的精调条目)原样保留;「全部装进选择器」也只刷新免费条目。

前置条件

  • 本机 settings.yaml 已有 llm-pi-ai.providers.openrouter 路由(baseURL: https://openrouter.ai/api/v1)+ 环境变量 OPENROUTER_API_KEY(使用免费模型也需要密钥)。
  • 拉取清单本身是公开 API,无需密钥。

安装

# 源码在本仓库;把包复制进运行中的 profile 并注册 bundle
Copy-Item -Recurse -Force . "C:\Users\73618\.dsh\profiles\web\node_modules\dsh-openrouter-free"
# 在 profile 的 package.json 里给 dsh.profile.bundles 追加 "dsh-openrouter-free"
# 然后重启 DSH(host 改动需重启;client 改动硬刷新即可)

HTTP API(POST /__orfree/api,body: {method, args})

method 说明
free.list({refresh}) 免费清单(缓存 10 分钟,refresh 强刷)
current() 当前 agent-default-model 与已装入的模型 id 列表
model.use({id}) 安装单个免费模型并设为当前对话模型
sync.all() 全部免费模型装入 openrouter 路由
free.remove({id}) 移除某个免费模型(当前选中者拒绝)

设计依据

  • DSH llm-pi-ai 适配器的 models 列表即"替换该路由 catalog",且 settings 分节更新在下一次请求生效、无需重启(见 packages/llm/llm-pi-ai/README.zh.md)。
  • 该适配器明确声明"路由的 catalog 不会自我刷新"——本插件就是补上这个自动化缺口。

License

MIT

← 上一个 Prev dsh-forge 下一个 Next dsh-desktop →