[Feature Request] Use OpenAI Codex OAuth as a primary LLM provider #208
Replies: 3 comments 1 reply
Local protocol proofI also ran a transient, in-memory proof against the installed pi-ai provider. No credential value was printed or written, and no repository file was changed.
Result: {"provider":"openai-codex","model":"gpt-5.6-terra","stopReason":"stop","text":"DSH_CODEX_OK"}This confirms that the provider protocol and current model catalog work end to end. The missing product work is the DSH-owned OAuth credential lifecycle and login surface described above, not the model transport itself. |
|
Looks at this Plugin: https://github.com/Yan-Zero/dsh-codex |
|
这个需求现在已经有可直接安装的通用实现:pi2dsh 0.3.1。它不是调用 Codex 子代理,而是让 OpenAI Codex OAuth token 进入 Harness 原生 LLM 路由,作为父会话主模型使用。 npm i -g pi2dsh@0.3.1
pi2dsh host --packages @narumitw/pi-accounts@0.49.7 --out ./dsh-pi-oauth
dsh plugin --profile web add pi2dsh@0.3.1 file:$PWD/dsh-pi-oauth在 profile 的 - id: credentials
name: pi2dsh/credentials-oauth
- id: llm-pi-ai
name: "@deepseek-ai/dsh-llm-pi-ai"
config:
providers:
openai-codex:
apiKeyEnv: PI2DSH_OAUTH_OPENAI_CODEX
models:
- id: gpt-5.6-luna启动 Web 后执行: 授权流程使用 PKCE + localhost callback,无头环境可走 device code;凭证以 0600 权限独立落在 Pi 格式 这条链路已经用真实 ChatGPT Pro 账号完整验证:浏览器授权 → token 落盘 → credentials provider → 官方 |

Uh oh!
There was an error while loading. Please reload this page.
Summary
Please support
openai-codex(ChatGPT Plus/Pro OAuth) as a primary LLM provider in DeepSeek Harness, so users can select Codex models on the Models page instead of only invoking Codex as a subagent.Tested against:
@deepseek-ai/dsh@0.1.0-rc.647f943859bef60e4160492346772ded9b24f765a@earendil-works/pi-ai ^0.82.1Current implementation evidence
Most provider-side building blocks already exist:
openai-codexprovider, its model catalog, theopenai-codex-responsesprotocol, browser/device-code OAuth, refresh logic, andCredentialStoreintegration.llm-pi-aialready materializes pi-ai catalog providers.PiAiAdaptercreatesModelswithout a credential store and exposes onlyresolveApiKey.dsh-subagent-codex, which delegates to the hostcodex app-serverand reuses native Codex authentication, but this does not make Codex available as the parent session model.The relevant code is in:
packages/llm/llm-pi-ai/src/catalog.ts(catalogProviderTakesApiKeyand the OAuth-only exclusion rationale)packages/llm/llm-pi-ai/src/adapter.ts(createModels()withoutCredentialStore)packages/llm/llm-pi-ai/src/index.ts(configurable-provider directory filtering)packages/subagent/subagent-codex/(working native-Codex delegation path)Expected behavior
Security boundary
DSH should use its own OAuth login and credential store. It should not read, copy, refresh, or overwrite
~/.codex/auth.json, because sharing a rotating refresh token between Codex CLI and DSH can invalidate one client and couples DSH to another products private file format.Suggested implementation
CredentialStore).Modelssnapshot with that shared store.AuthInteractionevents to the Web UI.Because the contribution guide currently says external pull requests are not accepted, would the maintainers prefer this as a first-party capability, or as an ecosystem
dsh-plugin? I can prepare a focused implementation after the intended ownership boundary is confirmed.All reactions