跳到主要内容

dsh-openai-codex-auth

已验证

dsh-openai-codex-auth · v0.3.2 · MIT · Web 界面

Unofficial OpenAI Codex provider for DeepSeek Harness with ChatGPT subscription sign-in.

安装

dsh plugin add dsh-openai-codex-auth

dsh --profile default --dump-config 确认 layer 已生效 —— 参见安装指南

源码

标签

作者

说明文档

dsh-openai-codex-auth

简体中文 | English

DeepSeek Harness 增加 openai-codex 模型提供方,通过符合资格的 ChatGPT 订阅登录,无需配置 OpenAI Platform API Key。

一个 LLM provider 路由应当只由一个插件负责。同时启用两个 openai-codex 实现会造成 adapter 注册冲突。

OpenAI Codex 中文设置页

功能

  • 使用 OpenAI Codex OAuth 设备码流程登录 ChatGPT;
  • 在 DSH 模型选择器中提供 Codex 模型及对应推理等级;
  • 在本地保存凭据并自动刷新令牌;
  • 在设置页显示登录状态、滚动用量周期、重置时间和 Credits。

要求

  • Node.js >=22.19.0
  • DSH 0.1.1-rc.2 Web profile;
  • 具有 Codex 使用资格并已启用设备码登录的 ChatGPT 订阅。

安装或更新

dsh plugin --profile web add dsh-openai-codex-auth

安装或更新后重启 DSH。

从源码安装

npm install
dsh plugin --profile web add .

这个包本身就是 DSH bundle,不需要再执行安装脚本。

使用

  1. 打开“设置 → OpenAI Codex”,选择“使用 ChatGPT 登录”;
  2. 打开验证页面,输入显示的设备码并完成授权;
  3. 在模型选择器的“OpenAI Codex”下选择模型。

DSH agent 也可以调用 codex_logincodex_statuscodex_logout

卸载

先在“设置 → OpenAI Codex”中退出登录,然后运行:

dsh plugin --profile web remove dsh-openai-codex-auth

最后重启 DSH。

安全

  • OAuth token 以 PI_OAUTH_OPENAI_CODEX 项保存在本地 $DSH_HOME/.credentials.yaml,不会发送到设置页面;
  • 用量数据只保留聚合百分比、重置时间和 Credits;
  • 请勿提交或分享 .credentials.yamlauth.json 或环境变量文件。

安全问题请按 SECURITY.md 私下报告。

开发

npm run check
npm test
npm pack --dry-run

提交改动前请阅读 CONTRIBUTING.md

License

MIT