Repository navigation
fix(openai): preserve session bindings during image account fallback - #769
Merged
Merged
Conversation
Co-authored-by: Codex <noreply@openai.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
问题与改动
严格账号亲和下,聊天绑定 A,而只有 B 能处理请求的图片模型。原生 Images 已按模型权限筛出 B,但根会话生图会把聊天绑定也迁到 B,子会话改图则可能一直等 A。已有的模型资格筛选见 #374。
现在,主账号仍在 Key 的授权池内、但未通过本次 Images 的模型、套餐或协议筛选时,根会话和子会话都可以临时用 B。B 必须位于允许该模型的启用分组内,且自己的模型规则也允许。请求完成后,下一轮聊天继续使用 A。主账号能生图但暂时繁忙时,严格子会话仍按原规则等待。
自审与验证
选号复用 OpenAI Provider 现有的候选过滤和账号租约。取得 B 的租约后,按选号时读到的版本续期 A 的绑定;若绑定已被其他请求更新,则释放租约并重新选号。显式固定账号仍受原有约束。
-D warnings)和git diff --check通过。AI 使用
使用 Codex(
gpt-6.2-astra)核实调度行为、实现修复、编写测试和文档,并完成自审。