Repository navigation
fix(调度): Grok 仅配置 API key 时识别为已认证 - #75
Merged
Merged
Conversation
dispatch 的 Grok 认证探测执行 grok models,原先只把会话横幅 "You are logged in with" 视为已登录。CLI 只配置 XAI_API_KEY、没有会话时同样以退出码 0 打印 "You are using XAI_API_KEY.",探测因此误报未认证。 现同时接受会话横幅与 API key 横幅;出现 "You are not authenticated" 时仍判未认证,没有确认句同样失败关闭。失败原因改为中性的 "Grok models did not confirm authentication"。测试用脱敏的 CLI 输出覆盖会话、带颜色会话、仅 API key、未登录、两者同时出现与无横幅。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
This branch had an error being deployed
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.
问题
dyro dispatch backends的 Grok 认证探测执行grok models,只把会话横幅You are logged in with视为已登录。CLI 只配置XAI_API_KEY、没有会话时同样以退出码 0 打印You are using XAI_API_KEY.,因此被误报为未认证。修复
You are not authenticated时始终判未认证;没有确认句仍失败关闭。Grok models did not confirm authentication。说明
authenticated=false(会话登录、未配置 API key),之后连续 3 次复跑未修改版本均为true,该次误报未能复现,根因证据不足(可能是会话令牌临时过期)。本 PR 修复的是另一个已实测的情况:仅配置 API key。XAI_API_KEY的环境传递一致,不存在"探测可见、运行被剥离"的错配。grok models不校验 key 是否有效,无效或已吊销的 key 仍会被报告为已认证。验证
tests.test_adversarial_remediation_dispatch、tests.test_local_agent_dispatch_l1_l4、tests.test_dispatch_cancellation:168 项通过。ruff check src tests experiments:通过。backends:grok 行authenticated: true。