Repository navigation
fix(proxy): clamp xhigh reasoning effort to high for o-series models - #7370
SailingLoong wants to merge 1 commit into
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
8d1f501 to
268b32a
Compare
268b32a to
4224af6
Compare
|
Rebased onto current The only textual conflict was main's new |
Follow-up to the second suggestion in #7318's review, now extended with the grok-4.3 note from #7369's review.
Problem / 根因
Since #7318 passes
xhighthrough verbatim (andmax/thinking: adaptivealready mapped to it before), two model groups receive areasoning_effortvalue they do not accept:xhighis invalid.xhigh(per the xAI docs, noted in fix(proxy): accept the whole grok-4.x (x>=5) family in the reasoning-effort whitelist #7369's review); it was also missing from the whitelist entirely, so its reasoning effort was silently dropped.Fix
grok-4.3family (grok-4.3,grok-4.3-*) insupports_reasoning_effort, alongside the mergedgrok-4.x (x ≥ 5)rule.clamp_reasoning_effort(model, effort)downgradesxhightohighwhen the target is an o-series model or grok-4.3 — the closest supported intent, mirroring how grok-4.5 documents a silent xhigh→high fallback. Applied at both injection sites (Chat Completionsreasoning_effort, Responsesreasoning.effort). Every other effort value and every other model is byte-identical to before; the newmaxtier (gpt-5.6/6 family,supports_max_reasoning_effort) never passes through the clamp.Rebased onto current
main(includes #7369's rule and themax-tier resolution).Tests
grok-4.3/grok-4.3-something; clamp downgrades xhigh foro3-mini/o1/grok-4.3(incl. mixed case) and passes through forgpt-5.4/grok-4.6/grok-4.7and non-xhigh efforts.xhighandthinking: adaptiveagainsto3-miniemithigh;xhighagainstgrok-4.3emitshighwhilehighpasses through.xhighagainsto3-miniemitshigh; againstgpt-5.4staysxhigh.cargo test --lib2991 passed / 0 failed (one known local port-binding flake skipped, unrelated);cargo fmt --checkclean.Happy to adjust.