yequ172672/dsh-codex-subscription
DSH 插件:直接复用 Codex CLI 本地登录订阅凭证,在 DeepSeek Harness 中使用 ChatGPT 订阅模型,无需 API Key
Project Overview项目介绍
This is a native LLM adapter plugin built exclusively for DeepSeek Harness (DSH). It lets DSH users reuse the existing local login credentials from OpenAI Codex CLI, so you can access ChatGPT subscription models like gpt-5.6-sol directly within DSH without requiring a separate OpenAI API key. As an official DSH plugin package with a valid bundle manifest, it activates automatically right after installation via DSH’s built-in plugin command. It does not require users to manually edit any composition or configuration files to get it working.
The plugin works by reading the auth.json credential file that Codex CLI generates after a successful login. It automatically refreshes expired access tokens and writes the updated token back to the original file atomically, keeping credentials perfectly in sync between DSH and Codex CLI. It also fetches the available model list in real time, and falls back to a local cached list then a built-in static list if the remote fetch fails. When paired with the dsh-session-import-codex plugin, it allows importing past Codex conversations for seamless continued chatting.
Before installing the plugin, you need to have the DSH core framework and pnpm package manager installed already, complete the login flow via Codex CLI, and have active network access to chatgpt.com. After successful installation, a new “Codex (ChatGPT subscription)” option will appear in DSH’s model selector, and users can configure proxy, custom credential file path and other optional settings. The plugin only supports text input, and shares the same ChatGPT subscription quota tied to your Codex CLI account.
这是一款专为 DeepSeek Harness(DSH)开发的原生 LLM 适配器插件,支持用户直接复用 Codex CLI 的本地登录凭证,在 DSH 中使用 gpt-5.6-sol 等 ChatGPT 订阅模型,无需额外配置 OpenAI API Key。它是标准的 DSH 插件包,通过 DSH 官方插件命令安装后会自动激活,不需要用户手动编辑配置文件。
插件原理是同源读取 Codex CLI 生成的 auth.json 凭证文件,支持自动刷新过期令牌并原子写回原文件,保证两边凭证状态同步,还支持实时拉取可用模型列表,失败时会逐层回退到本地缓存和内置静态列表。搭配 dsh-session-import-codex 插件还可导入 Codex 历史会话,实现模型与历史全链路打通。
安装前需要先安装 DSH 本体和 pnpm,完成 Codex CLI 登录,且确保网络可访问 chatgpt.com。安装后可在 DSH 的模型选择器中看到 Codex 订阅模型选项,支持配置代理、自定义凭证路径等,当前不支持图片内容输入,订阅额度和 Codex CLI 共用同一账号配额。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-codex-subscription(yequ172672/dsh-codex-subscription)
仓库:https://github.com/yequ172672/dsh-codex-subscription
本站详情页:https://www.yhbd.top/plugins/yequ172672-dsh-codex-subscription/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 16 · 最近提交 2026-08-17 · 主语言 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 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- 16 stars - an early-stage project星标 16,属于早期项目
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-llm-codex
把 yequ172672/dsh-codex-subscription 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-llm-codex
📦 已发布到 npm:dsh-llm-codex@0.1.1 · 📚 GitHub:yequ172672/dsh-codex-subscription · 🏷️ 属于 dsh-plugin 插件话题
DSH(DeepSeek Harness)LLM 适配器插件:直接复用 Codex CLI 的本地登录凭证,在 DSH 中 使用 ChatGPT 订阅模型(gpt-5.6-sol 等),不需要 API Key。
这是一个标准的 dsh 插件包:包内 dsh.bundle.patch 声明使其成为 profile 层,
通过官方 dsh plugin 命令安装后自动激活,无需手工编辑任何 composition 文件。
搭配推荐:dsh-session-import-codex
配合 dsh-session-import-codex 使用
效果更佳:它把 Codex 的历史会话导入 DSH(会话 id 形如 codex-<thread-id>),与本插件的
"凭证/模型复用"互补 —— 在 DSH 里既能用 Codex 订阅模型对话,又能无缝续聊 Codex 里
开过的对话,实现"模型 + 历史"全链路打通。
dsh plugin --profile web add dsh-session-import-codex
# 迁移(离线流程:先停止 dsh web 进程 → dry-run → 正式导入 → 重启 dsh)
pnpm --dir "$env:USERPROFILE\.dsh\profiles\web" exec dsh-import-codex --profile web --dry-run
pnpm --dir "$env:USERPROFILE\.dsh\profiles\web" exec dsh-import-codex --profile web
ℹ️
dsh-session-import-codex@0.1.1起已正确声明全部依赖,直接安装即可。
原理
Codex CLI(codex login)会把 ChatGPT 订阅的 OAuth 令牌写入 ~/.codex/auth.json(或
CODEX_HOME)。本插件与 codex CLI 同源读取该文件,并参照两个成熟实现
(参考实现:你的 oh-my-pi-cn 与
opencodex)的 wire 细节:
| 凭证形态 | 端点 | 认证 |
|---|---|---|
tokens(auth_mode: chatgpt,订阅) |
https://chatgpt.com/backend-api/codex/responses |
Authorization: Bearer <access_token> + chatgpt-account-id + OpenAI-Beta: responses=experimental + originator: pi + version |
OPENAI_API_KEY(auth_mode: apikey) |
https://api.openai.com/v1/responses |
Authorization: Bearer <api_key> |
- 凭证热跟随:每次请求都重新读
auth.json,CLI 登录/换号/登出,DSH 下一次请求自动生效。 - 令牌刷新:access_token 过期(HTTP 401)时用
refresh_token走auth.openai.com/oauth/token刷新并自动重试一次;刷新成功后默认原子写回 auth.json(writeBack: false可关闭),与 codex CLI 行为一致,两边凭证永远同步。 - 模型目录:优先实时拉取
GET {base}/codex/models,失败时回退~/.codex/models_cache.json,再回退内置静态列表。 - 协议:OpenAI Responses API(
stream: trueSSE),推理摘要、正文、工具调用分别映射为 DSH 的 reasoning / text / tool-call 块,usage 从response.completed提取。
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
anywhere-labs/Agents-Anywhere
amlyczz/dsh-agy-link
opencues/opencues
chaos-03x/dsh-agy