Khellendros97/dsh-subscription-auth ↗★ 3
dsh-subscription-auth
订阅会员 OAuth 登录(ChatGPT 等):配置中心「订阅服务」页登录/注销,自动发现订阅模型列表,按登录状态注册提供商,支持思考强度选择
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Khellendros97/dsh-subscription-auth说明文档
阅读完整 README ↗dsh-subscription-auth
给 dsh 增加订阅会员 OAuth 登录支持(模型提供商按订阅账号登录,而不是 API key)。内置四个订阅渠道:
| 渠道 | 登录方式 | 推理 API |
|---|---|---|
| ChatGPT 订阅(Plus/Pro) | 授权码 + PKCE + localhost 回调 | codex Responses API |
| Claude(Pro/Max) | 授权码 + PKCE + localhost 回调 | Anthropic Messages API |
| Grok(SuperGrok / X Premium+) | RFC 8628 设备授权流 | xAI Responses API |
| Kimi(Kimi Code) | RFC 8628 设备授权流 | Kimi Anthropic Messages API |
每个渠道是一个自包含模块(src/channels/.ts,实现 ChannelDefinition 契约),src/index.ts 是薄的通用驱动(遍历渠道定义注册 settings / provider / adapter / 路由)。OAuth 常量与 wire 格式以 omp(@oh-my-pi/pi-ai、@oh-my-pi/pi-catalog)源码为准。对接方法见内置 skill:subscription-channel-migration。
渠道详情
| 环节 | ChatGPT | Claude | Grok | Kimi |
|---|---|---|---|---|
| 授权端点 | https://auth.openai.com/oauth/authorize | https://claude.ai/oauth/authorize | https://auth.x.ai/oauth2/device/code | https://auth.kimi.com/api/oauth/device_authorization |
| 令牌端点 | https://auth.openai.com/oauth/token | https://api.anthropic.com/v1/oauth/token | (OIDC 发现 https://auth.x.ai/.well-known/openid-configuration) | https://auth.kimi.com/api/oauth/token |
client_id | app_EMoamEEZ73f0CkXaXp7hrann | 9d1c250a-e61b-44d9-88ed-5944d1962f5e | b1a00492-073a-47ea-816f-4c329264a828 | 17e5f671-d194-4dfb-9706-5516cb48c098 |
| scope | openid profile email offline_access api.connectors.read api.connectors.invoke | org:create_api_key user:profile user:inference user:sessions:claude_code user:mcp_servers user:file_upload | openid profile email offline_access grok-cli:access api:access |