Repository navigation
Conversation
…tions Antigravity returns 404 "Requested entity was not found." when an account's model mapping points at a model the account cannot serve. Treat only that exact 404 as an account/model availability signal so the handler can select another account, without cooling or disabling the current one. Codex gpt-6 accounts can also reject every prompt with a false-positive invalid_prompt usage-policy error (openai/codex#52846). Classify that exact marker for OpenAI OAuth-like accounts as request-level failover while keeping ordinary 400/404 responses and API-key content rejections terminal. Both paths skip account-health side effects and never retry the same account, since it cannot produce a different result.
riofutab
added a commit
to riofutab/sub2api
that referenced
this pull request
Nov 17, 2026
- 带入上游 11-16 已合的 55 个 PR,同步基准更新为 9cd1a1e;用量汇总改为非阻塞建表(Wei-Shaw#8693),被动用量换窗清理与 Fable 限额恢复采用上游实现(Wei-Shaw#8723 Wei-Shaw#8779)。 - Codex 独立上下文改用上游 Wei-Shaw#8769 的 user 文本归一化,撤回 fork 的 Wei-Shaw#8680 并补回 proposed_plan、guardian、cloud_threads 等类型;Gemini 思考等级改用 Wei-Shaw#8673,撤回 fork 的 Wei-Shaw#8619。 - 合入 24 个开放 PR,Wei-Shaw#8781 与 Wei-Shaw#8705 部分合入;Wei-Shaw#8856、Wei-Shaw#8858 与已有实现重复,未合入。 - 修复转义的 1h TTL 被快速路径漏判,并按 fork 的构造参数与模型目录调整上游测试。 - 后端全量 unit、golangci-lint、前端 vitest、迁移空库回放与 CI 集成测试通过;go.sum 未整理。
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.
问题
404 Requested entity was not found.,网关把它当普通 404 直接回写客户端,不换号。gpt-6账号触发Invalid prompt ... potentially violating our usage policy误报时,同样直接失败,不换号。改动
Requested entity was not found.,返回UpstreamFailoverError,RetryableOnSameAccount=false,跳过账号冷却/停用副作用。invalid_prompt+prompt was flagged as potentially violating our usage policy识别为请求级换号;普通 400/404 与 API Key 内容拒绝保持终止。shouldFailoverUpstreamError策略,避免把真实客户端错误也当可重试。验证
go test -tags=unit ./internal/service -run 'Test(Antigravity...|OpenAICodex...)' -count=1→ PASSgo test -tags=unit ./internal/service -count=1 -skip '^TestOllamaProbeCallback_StaleLongDoesNotOverrideNewShort$'→ PASSgo vet -tags=unit ./internal/service、gofmt -l→ PASSUpstreamFailoverError失败,OpenAIshouldFailover...期望 true 实际 false;恢复后全部通过。未验证
response.failed事件内的 Codexinvalid_prompt(本次只处理 HTTP 400/404 响应分类)。go test ./...。修复 #8679