Skip to content

fix(accounts): set API key account names once during import - #770

Merged
zyycn merged 1 commit into
mainfrom
fix/api-key-import-name
Nov 23, 2026
Merged

zyycn merged 1 commit into
mainfrom
fix/api-key-import-name

Conversation

@zyycn

@zyycn zyycn commented Nov 23, 2026

Copy link
Copy Markdown
Owner

问题与改动

在账号管理中选择「导入账号 → Codex → API 密钥」时,账号设置页和密钥页都显示同一个账号名称。第一步允许留空,第二步却会因名称为空而拦截导入。

现在只在账号设置页填写名称,密钥页直接从基础 URL 开始。手动导入使用 settings.name 提交自定义名称。服务端在密钥账号缺少名称时使用「密钥账号」,导入文件自带的名称也可以保留。

自审与验证

名称校验复用账号设置表单。默认名由 Provider 的密钥导入分支提供,单账号自定义名称沿用原有导入事务。

  • Playwright 在实际 Vue 页面配合模拟管理接口复现了旧版的必填拦截,并验证留空提交、返回上一步改名和已填连接信息保留。检查请求体确认自定义名称只提交一次。
  • provider-openai 的 4 项密钥导入测试通过,覆盖默认名称和自定义名称的导出再导入。
  • Rustfmt、provider-openai 严格 Clippy、前端 ESLint、含类型检查的生产构建及 git diff --check 均通过。

页面截图

入口为「账号管理 → 导入账号 → Codex」,使用同一组模拟数据、浅色主题和 1360 × 1000 窗口。

步骤 修改前 5fced665 修改后 9a16dcc2
账号设置 修改前的账号设置 修改后的账号设置
密钥导入 修改前再次要求填写账号名称 修改后直接填写基础 URL 和密钥

AI 使用

使用 Codex(gpt-6.2-astra)参与实现、自审、测试和截图验证。

Use the optional name from account settings and default unnamed key accounts to 密钥账号. Keep connection fields independent of naming.

Co-authored-by: Codex <noreply@openai.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T04:12:53.891164Z 9a16dcc PR opened
🔒 Security Review ✅ Completed 2026-11-23T04:14:48.159945Z 9a16dcc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zyycn
zyycn merged commit e41fdfc into main Nov 23, 2026
10 checks passed
@zyycn
zyycn deleted the fix/api-key-import-name branch November 23, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant