前言¶
DSH 插件生态强调“一切皆插件”。如果开发者希望在 DSH 中使用 pi-ai 的 openai-codex 模型,同时保持登录凭据与 DSH 内置 llm-pi-ai 设置分离,dsh-openai-codex 提供了一个独立入口。
dsh-openai-codex 是一个实验性、out-of-tree 的 DeepSeek Harness plugin。它把 pi-ai 的 openai-codex models 注册到 DSH 公开的 ctx.llm adapter seam,并用独立 credential file 管理 ChatGPT OAuth login。它不 patch 或替换已安装的 DSH package。
下面介绍它的定位、核心功能、安装启用、典型用法和注意事项。
定位与边界¶
dsh-openai-codex是实验性、out-of-tree DeepSeek Harness plugin,许可证为 MIT。- 它面向
@deepseek-ai/dsh0.1.0-rc.7,pinned to pi-ai0.82.1。 - 它要求 Node
^22.19.0 || >=24。 - 它注册 pi-ai 的
openai-codexmodels 到 DSH 的 publicctx.llmadapter seam。 - 它管理 ChatGPT OAuth login 在独立 credential file 中。
- 它使用 ChatGPT subscription-backed access,而不是 OpenAI Platform API billing。
- 它不 patch 或替换已安装的 DSH package。
- 它不提供原生
dsh authtop-level command,也不提供 DSH Web UI 的 OAuth card。 - 仓库路径为
bufeibufei/dsh-openai-codex;资料未提供显式维护者字段,本文不把 owner 当作确定事实。
核心功能¶
下面是已核实的能力:
- 在 DSH profile 中安装后,可在 DSH Models settings 中选择 provider
openai-codex和一个 listed model。 - 提供
dsh-codex-auth命令,支持login、status、models、path、logout。 - 支持从 tagged GitHub release 或 published tarball 安装。
- 将 transport 固定为 SSE。
- 不读取、复用或覆盖
~/.codex/auth.json中的 codex login state。 - 不提供 endpoint override 或 custom-header setting。
- 将 managed OAuth token 仅通过 pi-ai 的 fixed
https://chatgpt.com/backend-apiCodex provider 发送。
安装与启用¶
先确认版本要求:目标 DSH 为 @deepseek-ai/dsh 0.1.0-rc.7,Node 要求 ^22.19.0 || >=24。
在需要暴露 Codex 的 DSH profile 中安装 tagged release:
dsh plugin --profile headless add github:bufeibufei/dsh-openai-codex#v0.1.1
资料也列出 published tarball 安装方式,但未提供本文可用的确定命令;如需离线或本地安装,以发布物中的插件文件路径执行对应安装命令。
经过上面的步骤,插件会安装到指定 DSH profile。模型选择仍通过 DSH 的 Models settings 完成。
登录与验证¶
先执行登录命令:
dsh plugin --profile headless exec dsh-codex-auth login
当终端使用 HTTP_PROXY 或 HTTPS_PROXY 时,在启动 DSH 前设置:
$env:NODE_USE_ENV_PROXY = '1'
下面命令用于查看登录状态、可用模型、credential path,以及登出:
dsh plugin --profile headless exec dsh-codex-auth status
dsh plugin --profile headless exec dsh-codex-auth models
dsh plugin --profile headless exec dsh-codex-auth path
dsh plugin --profile headless exec dsh-codex-auth logout
登录完成后,打开 DSH 的 Models settings,选择 provider openai-codex,再选择其中一个 listed model。
可以用下面命令验证 bundle layer,而不启动 agent:
dsh --profile headless --dump-config
凭据与安全¶
credential 文件位置为:
$DSH_HOME/.dsh-openai-codex/auth.json
如果 DSH_HOME 未设置,则位于:
~/.dsh/.dsh-openai-codex/auth.json
权限只保护 against other OS users。该插件通过 DSH plugin 机制运行,权限来自当前 DSH 进程所在环境;不要 commit 该文件,不要 attach it to diagnostics,也不要 paste 其 contents。
dsh-codex-auth 管理的 OAuth token 只通过 pi-ai 的 fixed https://chatgpt.com/backend-api Codex provider 发送。插件不提供 endpoint override 或 custom-header setting,并将 transport 固定为 SSE。
适用场景与注意¶
适合:
- 希望把 ChatGPT subscription-backed access 接入 DSH 的开发者。
- 希望使用独立
dsh-codex-auth登录流程,而不是 OpenAI Platform API billing 的用户。 - 使用 DSH profile 并愿意在 DSH Models settings 中选择 provider/model 的用户。
注意:
- 这是实验性、out-of-tree 插件,端点或策略变化可能导致不可用。
- 不要同时配置 DSH 内置
llm-pi-aisettings 中的openai-codexroute。 - 插件不提供原生
dsh authtop-level command,也不提供 DSH Web UI 的 OAuth card。 - 它不读取、复用或覆盖
~/.codex/auth.json中的 codex login state。 - 安装前建议检查源码与许可证,并确认目标 DSH 版本和 Node 版本。
链接¶
GitHub:
https://github.com/bufeibufei/dsh-openai-codex
目录页链接来自资料线索,未出现在抓取资料中;社区目录是独立站点,不是 DSH 官方应用商店:
https://www.skillhub.cn/plugins/bufeibufei/dsh-openai-codex