npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-openrouter-free

v0.2.2

Published

OpenRouter 免费模型面板:自动拉取实时免费模型清单(综合能力 1-5★ 分级、最优优先排序),一键安装进 openrouter 路由并切换当前对话模型(全局默认 + 会话级双写,推理档自动选该模型支持的最高档),免手动配置。

Readme

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