前言¶
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