Repository navigation
fix(openai): Fast 模式对 GPT 模型重新生效(Responses 路径) - #191
Merged
Merged
Conversation
…the Responses path The Responses builder had the Codex rule (toggle on + gpt-family model -> priority) replaced by the xAI per-instance call alone, so the toggle was a silent no-op for GPT. Restore the rule, filling the key only when the xAI gate has not set it. Chat Completions is unchanged: it still carries the tier only for an eligible (xAI) instance. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PV4ECd3Yzu9k81sw7vHjS3
Merged
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.
问题
Fast 模式(设置里的开关)对 GPT 模型没有任何效果:开着也不会发
service_tier: "priority"。原因
Responses 请求构造里,原本的 Codex 规则(开关开启且模型 id 含
gpt→service_tier: "priority",OpenMinis 1.14 仍是这样)被换成了只对 xAI 实例生效的resolvedServiceTier()。代码旁边的注释还写着 gpt 规则,行为已经不是了。改动
OpenAIProviderResponses.kt:保留 xAI 的每实例判断,再补回 gpt 规则,只在service_tier还没有值时填入,两者互不覆盖。Chat Completions 路径不变,仍然只有符合条件的 xAI 实例才带这个字段。测试
CodexFastModeTest(4 个):GPT 模型开关开 → 带 priority;开关关 → 不带;非 GPT 模型开关开 → 不带(否定);GPT 模型走 Chat Completions → 不带(否定)。XAIPriorityProcessingTest7 个仍通过。未验证
没有用真实 Codex 账号确认后端是否真的按 priority 处理;响应里的
service_tier回执已有日志可以查看。🤖 Generated with Claude Code
https://claude.ai/code/session_01PV4ECd3Yzu9k81sw7vHjS3
Generated by Claude Code