Conversation
识别官方原生认证的请求级供应商,避免文本目录遗漏图片模型后丢失官方通道。官方本地图片生成复用原始字节转发,防止默认文本模型覆盖图片请求;保留第三方路由、外部 API 和文本严格匹配行为。 验证:新增回归先失败再通过;104 项处理器测试及 14 项原始转发测试通过;本地 HTTP 验证请求字节、图片模型及合成认证头;Rust 格式、前端类型和格式检查通过。未执行真实 OAuth 联调、完整 Rust 套件或 Clippy;未构建安装包或替换运行程序。
MattLYT
marked this pull request as ready for review
September 30, 2026 10:34
This branch has not been 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.
概述
修复 Codex Desktop 内置图像生成在 MultiRouter 中无法使用官方当前登录态的问题。
官方供应商选择
desktop_current_login后,路由会物化为带有codexNativeAuthPassthrough的请求级供应商,而不会标记为托管codex_oauth。原图片通道判定遗漏了这一身份;当目录只包含文本模型时,gpt-image-2无法找到官方图片通道,生成请求报模型路由错误,编辑请求还可能回到本机代理并触发递归保护。另外,生成请求原先经过文本 JSON 转发,可能将图片模型改成供应商配置的默认文本模型。
本次改动:
关联 Issue
暂无关联 Issue,来源于 Codex Desktop 内置图片工具的实际故障。
截图
不适用,本次没有界面改动。
验证
gpt-image-2,JSON 字节、提示词、路径、查询参数和合成 Bearer 认证均保留,响应成功。cargo test --manifest-path src-tauri/Cargo.toml --lib -j 1 proxy::handlers:: -- --test-threads=1:104 项通过。cargo test --manifest-path src-tauri/Cargo.toml --lib -j 1 proxy::forwarder::tests::raw_ -- --test-threads=1:14 项通过,包含原生认证、固定 OAuth、账号池及第三方路由边界。测试使用隔离目录、内存数据库及合成请求。本次未重新执行真实官方 OAuth 图像调用、未运行完整 Rust 测试套件或 Clippy,也未构建、安装或替换桌面程序。
检查清单
pnpm typecheck通过。pnpm format:check通过。cargo clippy:本机未运行,交由 PR 的严格 CI 检查;本机已完成上述定向回归。