Conversation
Controlled Sol requests return HTTP 400 with version 0.158.0-alpha.2.1 and complete successfully without it. Preserve User-Agent, trusted originator, authentication and native attestation while retaining removal of stale version overrides. Validation: 46 Codex forwarder regression tests passed; rustfmt and diff checks. Installed runtime validation follows the local build and upgrade transaction.
MattLYT
marked this pull request as ready for review
September 30, 2026 04:51
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.
Summary / 概述
修复 Codex 经本地代理调用 OpenAI Official 的
gpt-6.1-sol时返回 HTTP 400、提示 ChatGPT 账号不支持该模型的问题。对照实验中,同一官方请求携带
version: 0.158.0-alpha.2.1时返回上述错误,移除该请求头后返回 HTTP 200、OK和response.completed。该头由代理从真实 Codex User-Agent 提取并合成;两份不同的 access token 均可独立成功调用,因此本次不修改或同步凭证。上游为何拒绝该版本值尚未确认。本次仅修改
src-tauri/src/proxy/forwarder.rs:version请求头,并删除不再使用的提取函数。version覆盖值的行为,同时保留真实 User-Agent、可信 originator、认证及可信原生 attestation。验证
v3.20.4-1执行转发模块针对性测试:cargo test --manifest-path src-tauri/Cargo.toml --lib proxy::forwarder::tests:: -- --test-threads=1,177 项通过。gpt-6.1-sol、gpt-6-astra均返回OK和turn.completed;代理日志确认路由至 OpenAI Official,上游均返回 HTTP 200。runner_tests.rs的 dead_code、session_usage_codex.rs的 invalid_from_utf8);Clippy 无警告或错误。未运行全量 Rust 测试。Related Issue / 关联 Issue
无。
Screenshots / 截图
不适用,本次为请求转发逻辑修复,无界面变化。
Checklist / 检查清单
pnpm typecheckpasses / 通过 TypeScript 类型检查。pnpm format:checkpasses / 通过前端格式检查;修改的 Rust 文件另已通过 rustfmt 检查。cargo clippypasses (if Rust code changed) /cargo clippy --manifest-path src-tauri/Cargo.toml通过,无警告或错误。