
上游在 HTTP 200 的流里说余额耗尽,sub2api v0.2.19 记成 502、既不换号也不停用该号;同一小时另有 503 的 retry-after 被截到 8 秒、以及面板看不到配置 API key 余额两件事。
status=error、schedulable=false。它现在只是 open,4 个文件 +322/−6、1 个提交、mergeable 状态 unstable。event: error
data: {"type":"error","error":{"code":"credit_balance_exhausted","type":"insufficient_quota","message":"You have no credits remaining."}}openAIStreamFailedEventSemanticStatus(第 1409 行起)先看有没有 status 字段,再看 rate_limit、invalid_request、authentication、permission 几类关键字。1insufficient_quota 一类都不属于,落到 default 返回 502。openAIStreamFailureStatus(第 1444–1451 行)只放行 401、403、429、529;503 还要再判一次容量让渡。2openAIStreamErrorEventShouldFailover(第 1618 行起)。它的 switch 同样只认 403、401、429、529,后面只看请求级瞬时错误。3
openai_gateway_passthrough.go 第 1444–1458 行:只放行 401、403、429、529,503 先判容量让渡,其余一律 5022persistOpenAIWSRateLimitSignal 会记一条限流信号,参与后续调度。7
openai_ws_forwarder_support.go 第 669–687 行:code 里出现 insufficient_quota 即判为限流6You have no credits remaining.、credit_balance_exhausted、insufficient_quota。命中的行写着 502,别因为不是 402 或 429 就当网络抖动。status=error、schedulable=false 就是这一步,只是交给代码代做。stream=false 但上游回 SSE 的两条路也用同一套分类。8account_id、server_is_overloaded、upstream_status_code 503。retry-after 分别是 309、324、6、326 秒,四条相隔 10.9 到 13.6 秒。newOpenAIUpstreamFailoverError 把 SameAccountRetryDelay 设成 openAIRequestScopedRetryDelay 的结果。10const openAIRequestScopedRetryMaxDelay = 8 * time.Second。
openai_gateway_upstream_errors.go 第 198–233 行:六个取头路径都读,但值大于 8 秒就一律返回 8 秒11failover_loop.go 第 36 行),就是日志里那四枪。12pool_mode_retry_count,默认 3、上限 10。13openai-compatibility 这类配置 API key 加一个配置声明的额度探测,好在面板上看到余额。提案列的机制有三条,本刊核到其中两条。
auth_files.go 第 697–710 行:if !quota.v8 && auth.Metadata != nil 之后才写 quota_probe15quota_probe:整包在 synthesizer 目录里搜不到这个键。http.Client 不带超时(第 445–447 行)、读响应体没有上限(第 459 行的 io.ReadAll)、非 2xx 把上游 body 整段拼进错误里(第 465 行)。
plugin_quota.go 第 443–472 行:http.Client 只有 Transport,io.ReadAll 无上限,非 2xx 把 body 原样拼进错误19openai-compatibility 接到自己的项目。20reasoning.effort: none 回 400,属于旧版的事,别当现在的口径。github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
github.com
status.openai.com
status.claude.com
status.cloud.google.com
This story was produced automatically by a channel. One sentence is all it takes for Neodrop to keep producing for you.