
这一小时四个仓库没发新版本,sub2api v0.2.17 把无法识别账单的 Grok 402 当成欠费,单请求最多连坐 11 个账号;修复 #8235 未合并,本文给出三条止血与判据。
7bcacfea-5f76-401f-a654-e70036af3d91 的失败转移事件里,platform 是 grok,upstream_status_code 是 402,message 是「xAI upstream returned status 402」。spending limit、out of credits、subscription required,一个都没有。1temp_unschedulable_until 立刻恢复,重试同一请求也能成。1classifyGrokUpstreamFailure 把 statusCode == http.StatusPaymentRequired 直接算成账单问题,返回 GrokFailureBilling,冷却 30 分钟,ShouldCooldown 与 ShouldFailover 同时为 true。3
case http.StatusPaymentRequired 仍然无条件调用 tempUnscheduleGrok(ctx, account, 30*time.Minute, "grok payment required"),注释写的是「没有 body 分类结论时沿用老的 30 分钟冷却」。4
gateway.max_account_switches 默认 10,单请求因此最多把 11 个账号打成同一个理由。5kind: failover,platform 都是 grok,message 只有「xAI upstream returned status 402」,这就是本条的形态。1temp_unschedulable_reason 为 grok payment required、temp_unschedulable_until 在 30 分钟之后,而账号本身能正常授权,就可以判定为误伤。4UpstreamResponseBody 字段却没有赋值,所以空 body 与真欠费在日志里长得一样。8gateway.max_account_switches 从 10 调到 2 或 3,单次请求最多连坐 3 到 4 个号。代价是遇到真实欠费时换号次数也变少,客户端更早收到错误。5isGrokUnrecognizedPaymentRequired:空 body、HTML、以及只写着 402、402 payment required、http 402 的裸文本都算「不指向账号」,一律不冷却、不换号,直接把错误交回客户端。2GrokFailureCompatibility,ShouldCooldown 与 ShouldFailover 都为 false。9
rateLimitGrok,写的是额度恢复时间。2402 Payment Required、<html>402 Payment Required</html> 三种都不写状态;带「run out of credits or need a Grok subscription」的才继续冷却。2account_test_service 里原来对空 body 的 402 也会写 30 分钟不可调度,现在同一判断先过一遍,未识别就返回。2| 单号 | 上游状态 | 现在的行为 | 现在该做什么 |
|---|---|---|---|
| #8152 | 无法识别的 403 | 记成 entitlement denied,冷却 30 分钟,可换号 | 等 #8153;先清冷却 |
| #8197 | 任意 402(通用链路) | 池模式什么都不记,非池模式直接停用账号 | 别把余额敏感的号放进非池模式 |
| #8234 | 无法识别的 402(Grok 链路) | 记成 payment required,冷却 30 分钟,可换号 | 本文三条止血 |
ratelimit_service.go 的通用 402 分支,与 Grok 专用的这一条是两条代码路径。11| 条目 | 形态 | 北京时间 | 读者现在能做什么 |
|---|---|---|---|
| sub2api #8236 | issue,非 PR | 11:48 | 记下需求,暂无实现 |
| CLIProxyAPI #6791 | issue,0 评论 | 11:37 | 改代理配置前先自查 UA |
| sub2api #8195 | PR,仅 rebase | 11:55 | 继续等,窗口内无新代码 |
| CLIProxyAPI #6715 | PR,窗口内无新提交 | — | 继续等,仍 open |
cli-proxy-openai-compat;xai 执行器只在 base_url 是官方 CLI chat-proxy 时才写 xai-grok-workspace/<版本>,其余走默认头,UA 就落到 Go 自带值。1415
f00af0cc,作者时间是十月十七日 22:27(北京),提交者时间才是今天 10:21,属于 rebase 到新主干,不是新代码。168f2cbb53(昨天 20:45),CLIProxyAPI 的 main 停在 ae3ee3be(今天 00:55)、dev 停在 10:16。2223github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
status.openai.com
status.anthropic.com
status.cloud.google.com
codex-reset.com
opentherank.com
community.openai.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.