Khellendros97/dsh-subscription-auth
dsh对接OpenAI、Grok、Anthropic、Kimi订阅渠道
Project Overview项目介绍
dsh-subscription-auth is a purpose-built plugin for DeepSeek Harness (DSH) that enables OAuth login for personal LLM subscription accounts. It eliminates the need for separate paid API keys by letting users access models through their existing consumer subscriptions to four major providers: OpenAI ChatGPT, Anthropic Claude, xAI Grok, and Moonshot AI Kimi. It uses the standard PKCE authorization code flow for ChatGPT and Claude, and the RFC 8628 device authorization flow for Grok and Kimi, matching each provider’s official OAuth requirements. It ships with a valid DSH bundle manifest and can be installed in one command via the DSH CLI, with automatic registration after a restart and browser hard refresh.
This plugin is designed for DSH users who already hold active consumer subscriptions to any of the supported providers and want to avoid paying for separate API quota. After installation, you will need to restart your DSH instance and perform a hard browser refresh to load the plugin’s settings UI. Once loaded, you can navigate to the subscription services panel in DSH settings, click login for your desired provider, complete the OAuth flow as prompted, and the plugin will automatically pull available models and add them to DSH’s model selector. It also supports custom reasoning effort settings for supported models, letting users adjust thinking budget to match their specific task needs.
The plugin is released under the permissive open-source BSD-3-Clause license, and requires a working DSH installation, Node.js version 20 or newer, and a working pnpm installation to install correctly. Key known limitations include that Anthropic’s OAuth access tokens expire after roughly 30 days, and refresh tokens cannot extend the authorization period, so users must re-login after expiration. The plugin stores all login tokens in DSH’s local credential service, so it only works with locally hosted DSH instances, and users should never share their local credential data with third parties. It also supports manual configuration of custom base URLs and fixed model lists for advanced users to override defaults.
这是专为 DeepSeek Harness (DSH) 开发的原生插件,为 DSH 增加了 LLM 订阅账号的 OAuth 登录能力,允许用户使用个人订阅账号而非 API 密钥调用对应模型服务。插件内置四个主流订阅渠道:ChatGPT Plus/Pro、Claude Pro/Max、Grok SuperGrok/X Premium+、Kimi Code,分别适配 PKCE 授权码流和设备授权流两种标准 OAuth 流程,自带 DSH 捆绑清单,支持 DSH CLI 一键安装挂载。
该插件面向已有对应大模型订阅、不想额外购买官方 API 额度的 DSH 用户使用。安装完成后需要重启 DSH 并硬刷新浏览器,之后即可在设置页的「订阅服务」面板看到所有支持的渠道,点击对应渠道的登录按钮,跟随页面指引完成授权即可,登录成功后会自动拉取该渠道下的可用模型列表,注册到 DSH 的模型选择器供调用。
该项目采用 BSD-3-Clause 开源许可证,使用要求已有可正常运行的 DSH 环境、Node.js 20 以上版本,同时需要 pnpm 可用。已知限制包括 Anthropic 订阅的授权有效期约 30 天,刷新令牌无法延长有效期,过期后需重新登录;授权回调绑定本地端口,仅支持在本地运行的 DSH 实例使用;令牌存储在本机凭证服务,请勿外传。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-subscription-auth(Khellendros97/dsh-subscription-auth)
仓库:https://github.com/Khellendros97/dsh-subscription-auth
本站详情页:https://www.yhbd.top/plugins/khellendros97-dsh-subscription-auth/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 BSD-3-Clause · ⭐ 4 · 最近提交 2026-08-15 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
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 dsh-subscription-auth
把 Khellendros97/dsh-subscription-auth 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-subscription-auth
给 dsh 增加订阅会员 OAuth 登录支持(模型提供商按订阅账号登录,而不是 API key)。内置四个订阅渠道:
| 渠道 | 登录方式 | 推理 API |
|---|---|---|
| ChatGPT 订阅(Plus/Pro) | 授权码 + PKCE + localhost 回调 | codex Responses API |
| Claude(Pro/Max) | 授权码 + PKCE + localhost 回调 | Anthropic Messages API |
| Grok(SuperGrok / X Premium+) | RFC 8628 设备授权流 | xAI Responses API |
| Kimi(Kimi Code) | RFC 8628 设备授权流 | Kimi Anthropic Messages API |
每个渠道是一个自包含模块(src/channels/<id>.ts,实现 ChannelDefinition 契约),src/index.ts 是薄的通用驱动(遍历渠道定义注册 settings / provider / adapter / 路由)。OAuth 常量与 wire 格式以 omp(@oh-my-pi/pi-ai、@oh-my-pi/pi-catalog)源码为准。对接方法见内置 skill:subscription-channel-migration。
渠道详情
| 环节 | ChatGPT | Claude | Grok | Kimi |
|---|---|---|---|---|
| 授权端点 | https://auth.openai.com/oauth/authorize |
https://claude.ai/oauth/authorize |
https://auth.x.ai/oauth2/device/code |
https://auth.kimi.com/api/oauth/device_authorization |
| 令牌端点 | https://auth.openai.com/oauth/token |
https://api.anthropic.com/v1/oauth/token |
(OIDC 发现 https://auth.x.ai/.well-known/openid-configuration) |
https://auth.kimi.com/api/oauth/token |
client_id |
app_EMoamEEZ73f0CkXaXp7hrann |
9d1c250a-e61b-44d9-88ed-5944d1962f5e |
b1a00492-073a-47ea-816f-4c329264a828 |
17e5f671-d194-4dfb-9706-5516cb48c098 |
| scope | openid profile email offline_access api.connectors.read api.connectors.invoke |
org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload |
openid profile email offline_access grok-cli:access api:access |
(设备流,无 scope) |
| 回调 | http://localhost:1455/auth/callback |
http://localhost:54545/callback |
设备流(无回调) | 设备流(无回调) |
| 调用端点 | https://chatgpt.com/backend-api/codex/responses |
https://api.anthropic.com/v1/messages |
https://api.x.ai/v1/responses |
https://api.kimi.com/coding/v1/messages |
登录时:授权码渠道(ChatGPT / Claude)生成 PKCE 挑战 → 用 rundll32 打开浏览器(不能用 cmd /c start:URL 里的 & 会被截断)→ 本地一次性 HTTP 服务器收 code+state(10 分钟超时)→ 换令牌 → 存进 credential 服务。设备流渠道(Grok / Kimi)请求设备码 → 打开验证页并展示授权码 → 后台轮询直到用户完成授权 → 存令牌。之后每次请求前检查 access token 快过期则静默续期。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Q00/ouroboros
crafter-station/petdex
whiteguo233/OpenBiliClaw
anywhere-labs/Agents-Anywhere
agentrq/agentrq
freestylefly/wesight