Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

app: setup says a dead OpenRouter key works

未关闭 适合新手
#2,022 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
77/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
go

调研方向

从 cmd/codeaf/appaccount.go 开始,尤其查看引用行附近的 appCheckKey,并追踪桌面应用如何转发 keys.check。检查 provider 验证如何在报告成功前拒绝无效凭据,同时保持模型列表处理独立。添加一个 stub,覆盖包含无效凭据的 200 catalog 响应;当 setup 拒绝该凭据且针对性检查通过时,即为完成。

由索引模型根据 Issue 内容生成。

描述

What happens

On Windows with engine app/v3 12dadd64a, setup reports “Key works · 457 models available” and “Connected” for a credential whose first chat turn fails with HTTP 401, “User not found.”

Expected

Connect proves that OpenRouter accepts the credential before reporting success or saving it. Fetching a public model catalog is insufficient.

Repro

  1. Launch the desktop app with an isolated, unconfigured profile and this engine revision.
  2. Choose OpenRouter, enter a revoked credential, and press Connect.
  3. Continue setup, select a model, and send a short chat message.
  4. Compare setup's success with the turn's 401.

Evidence

Windows stability check, 2026-10-28, setup §1 and O2. At 12dadd64a, cmd/codeaf/appaccount.go:144 selects /models/user; :309 invokes appCheckKey; :471 sends GET with Authorization; :510 sets OK: true after parsing a 200 model list. A separate credential-free check using a deliberately invalid bearer value returned 200 with 457 models from both /models and /models/user, versus 401 from /key. No real credential was used for that check.

Since when

Pre-existing: /models/user selection is already present at 5c5e66c7f (2026-10-16), before the October 28 merges. The first affected release is unknown.

Likely cause / where to look

Engine-owned provider validation: appCheckKey treats a successful listing as authentication. The desktop forwards keys.check. Use an endpoint that actually rejects invalid credentials, then fetch models separately; cover invalid-credential/200-catalog behavior with a stub.

主要语言
Go
星标
115
派生
14
平均合并
8 小时 36 分钟
30 天内合并 PR
229

环境准备

我们还没有检查这个项目的环境配置文件。先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Agent-Field/CodeAF 的其他 Issue

查看 Agent-Field/CodeAF 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。