Repository navigation
Conversation
MattLYT
marked this pull request as ready for review
September 30, 2026 10:34
识别官方原生认证的请求级供应商,避免文本目录遗漏图片模型后丢失官方通道。官方本地图片生成复用原始字节转发,防止默认文本模型覆盖图片请求;保留第三方路由、外部 API 和文本严格匹配行为。补充 Windows EXE 构建的前端资源路径与启动验收注意事项。 验证:新增回归先失败再通过;104 项处理器测试及 14 项原始转发测试通过;本地 HTTP 验证请求字节、图片模型及合成认证头;Rust 格式、前端类型和格式检查通过。后续真实登录态下生成和参考图编辑均返回 200 与非空图片,前端资源修正后的 EXE 已启动并确认窗口正常。 本次整理仅新增文档,路由源码及测试与已验证版本一致;未重复图像调用或运行完整 Rust 套件及本机 Clippy,未制作安装包。
MattLYT
force-pushed
the
codex/fix-native-image-routing
branch
from
October 11, 2026 15:24
50b35b8 to
bb4acf3
Compare
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 转发,可能将图片模型改成供应商配置的默认文本模型。
本次改动:
frontendDist,先生成对应版本的前端资源,并实际启动检查界面。关联 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、账号池及第三方路由边界。隔离回归使用内存数据库及合成请求。本次整理只增加 README 文档,路由源码及测试与上述已验证版本一致;没有重新执行图像调用,也未在修正前端资源后再次进行图像端到端验证。未运行完整 Rust 测试套件或本机 Clippy,未制作安装包;本机部署产物、配置、数据库、备份和临时部署脚本不包含在此 PR 中。
检查清单
pnpm typecheck通过。pnpm format:check通过。cargo clippy:本机未运行;原源码提交的 PR CI 后端检查已通过,整理后的 HEAD 由 CI 再次验证。