Skip to content

feat(ui-mac): 模型选择器 — 代理激活修复 + BYOK key 管理 - #16

Merged
jinjunnn merged 1 commit into
alphafrom
feat/auth-1-proxy-byok
Jun 30, 2026
Merged

feat(ui-mac): 模型选择器 — 代理激活修复 + BYOK key 管理#16
jinjunnn merged 1 commit into
alphafrom
feat/auth-1-proxy-byok

Conversation

@jinjunnn

Copy link
Copy Markdown
Owner

PR 1/2 of the auth work (state-based split).

模型选择器代理激活修复 + BYOK key 管理(已提交的 3139c42,12 文件)。第二个 PR(endpoint 发现 / auth routing)叠在本 PR 之上。

🤖 Generated with Claude Code

代理:
- 登录默认 platform 模式(代理为推荐默认),新增 auth.enableProxy() 一键重启激活;
- 锁定行点击三态解耦(未登录→登录 / 无余额→充值 / 已登录有额度但代理未生效→重启启用),
  替代原“PRO 也灰、点击去充值/重登”的死胡同。

BYOK key 管理:
- P1 key 状态门控:providers.keyStatus()(主进程查 env keyEnv + opencode.jsonc options.apiKey),
  未配 key 的内置供应商灰显“需 Key”、点击进配置(不再展示选了会 401 的模型);
- P2 已配置可视化 + 替换/移除:表单显示“已配置 ••••后4位 · 来源”、留空保留、粘贴替换,
  新增 providers.remove();keyStatus.hint 仅回后4位(全 key 不过 IPC 边界);
- P3 管理入口:BYOK 组头“管理”按钮 + 供应商卡片“已配置”徽标(添加流程兼作管理列表)。

全部零改 upstream(ui-mac 自有文件);typecheck + build 通过。
未用 opencode 原生 auth.set:其无读回接口(无 GET /auth),配置存储可被主进程内省、更稳。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@jinjunnn
jinjunnn merged commit faa71c7 into alpha Jun 30, 2026
3 of 8 checks passed
@jinjunnn
jinjunnn deleted the feat/auth-1-proxy-byok branch June 30, 2026 06:47
jinjunnn added a commit that referenced this pull request Jul 5, 2026
…署实证) (#101)

- alpha-models.json 策展跟随:DeepSeek 旧代两条移除(live allowlist 为准,snapshot 兜底同步),版本 bump
- B 侧真源:alpha-platform PR #15(models.config.json 单一真源+aliases 降级)/#16(欠费 failover+route 计价),均已 prod 部署
- prod 实证:/v1/models edition:cn 仅 v4 两档;旧 id settle 走 v4 价;upstreamProvider=openrouter 按 route 价结算;EDITION_CONFIG 上 var(运营者 u_18018709299→intl)
- codex 审计(0 P0/1 P1/4 P2)全修:web 策略钉死首选 route/preauth 按链上最贵/同链 provider 唯一/NaN loud-fail/disabled settle loud warn

Co-authored-by: jinjunnn <slmbaovanetti99@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
jinjunnn pushed a commit that referenced this pull request Jul 9, 2026
- BACKLOG:REQ-081 → verified(线上端点 24 条/三件套缺席/A 公钥验签 true;附 ECS↔GitHub 不通时的 SSH 直推部署插曲);E2 → archived(退役,首调用验收作废、供应链 _verify 了结)
- CHANGELOG [Unreleased] Changed:市场下架三件套(云端已生效,已装用户不受影响)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant