feat(openai): 为 OAuth 账号增加反代开关并限制 Codex 仅使用启用账号#90
Open
flyhelanman wants to merge 2 commits intocubezhao:mainfrom
Open
feat(openai): 为 OAuth 账号增加反代开关并限制 Codex 仅使用启用账号#90flyhelanman wants to merge 2 commits intocubezhao:mainfrom
flyhelanman wants to merge 2 commits intocubezhao:mainfrom
Conversation
- 为 OpenAI 账号模型、数据库迁移和存储映射新增 reverse_proxy_enabled 字段,并保持默认开启以兼容旧数据 - 调整 Codex 账号池筛选逻辑,仅使用启用反代的 OAuth 账号,并在 Single 策略下为不可用选中账号增加可用账号回退 - 为 OpenAI 账号管理页补充单条和批量反代操作,统一通过现有更新/保存流程落库并刷新 Codex 池 - 优化卡片和表格视图中的反代交互,将状态切换收敛到更多菜单的动态动作项并补充中英文文案
- 在 OpenAI 账号更多菜单中新增“复制第三方凭证”入口,并调整到复制 RT/AT 附近 - 新增统一的第三方凭证弹层,按模板选择后展示预览并支持一键复制 - 抽离 openaiThirdPartyCredentials 模块,内置 cc-switch 凭证生成实现,便于后续继续扩展 - 补充中英文文案和最小测试,覆盖 cc-switch 凭证结构与模板可用性判断
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
在部分使用场景下,ATM 只用于集中管理大量 OpenAI 账号,但只有部分 OAuth 账号需要实际参与 API 反代 / Codex 路由。
当前缺少账号级别的反代控制能力,导致被管理的 OAuth 账号会一起进入 Codex 账号池,不方便按需隔离。
改动内容
reverse_proxy_enabled开关,默认值为trueSingle策略,在选中账号不可用时回退到第一个可用账号兼容性
验证