Skip to content

fix(openai): Fast 模式对 GPT 模型重新生效(Responses 路径) - #191

Merged
Slacker-LLC merged 1 commit into
mainfrom
fix/codex-fast-mode
Oct 10, 2026
Merged

Slacker-LLC merged 1 commit into
mainfrom
fix/codex-fast-mode

Conversation

@Slacker-LLC

Copy link
Copy Markdown
Owner

问题

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 → 不带(否定)。
  • XAIPriorityProcessingTest 7 个仍通过。

未验证

没有用真实 Codex 账号确认后端是否真的按 priority 处理;响应里的 service_tier 回执已有日志可以查看。

🤖 Generated with Claude Code

https://claude.ai/code/session_01PV4ECd3Yzu9k81sw7vHjS3


Generated by Claude Code

…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
@Slacker-LLC
Slacker-LLC merged commit f1a4ee3 into main Oct 10, 2026
14 checks passed
@Slacker-LLC
Slacker-LLC deleted the fix/codex-fast-mode branch October 10, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants