fix: 让 Responses 工具默认值不受会话身份影响 - #2225
Open
Yuimi-chaya wants to merge 3 commits into
Open
Yuimi-chaya wants to merge 3 commits into
Yuimi-chaya wants to merge 3 commits into
Conversation
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++ 的会话身份(
custom/openai)与模型请求实际使用的 API 传输不是同一件事。使用同一个 Responses API 上游时,切换为 OpenAI 会话身份后,原有 catalog 判断会跳过标准 Responses 的工具默认值处理,可能留下模板中的use_responses_lite=true。这会造成同一后端在不同会话身份下采用不同的工具协议;在不支持独立搜索路径的后端上,可能表现为网页搜索请求落到未实现的
/v1/alpha/search。本修复针对目录默认值选择,不新增该搜索接口。改动
将目录默认值判断从仅识别 custom provider,扩展为识别实际的受管理 API 模式,并始终要求真实上游协议为 Responses:
PureApi、MixedApi、开启official_mix_api_key的Official,在 custom/OpenAI 身份下均默认使用use_responses_lite=false。82fb092适配动态代理端口、路由目录、多代理 v2 元数据和上下文窗口上限规则。生产代码仅修改
relay_config.rs,另增加responses_catalog_identity.rs回归测试。兼容边界
profile.protocol判断真实上游协议,不用对 Codex 恒为responses的wire_api推断协议。model_metadata的显式覆盖仍优先,包括use_responses_lite=true,不在自动默认值修复的保证范围内。验证
提交
03f390c对应的 Windows 测试包已通过真人测试。下列自动化矩阵覆盖不等同于所有真实账号、平台和后端组合均已逐项实测。三个忽略项分别需要专有原生浏览器夹具、外部主题仓库和运行中的 Desktop CDP renderer;不计入通过数。未做 macOS/Linux 实机构建或验收。
Rust 验证命令: