fix(providers): strip reasoning_effort/reasoning from grok-cli requests (#6288) - #6503
Merged
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…rok-cli-reasoning-effort
…rok-cli-reasoning-effort
Owner
Author
|
Merged — synced onto the v3.8.47 tip (CONFLICTING was base-drift). CHANGELOG guard applied. All checks green. Fixes #6288. |
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…ts (diegosouzapw#6288) (diegosouzapw#6503) fix(providers): strip reasoning_effort/reasoning from grok-cli requests (diegosouzapw#6288). Integrated into release/v3.8.47.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…ts (diegosouzapw#6288) (diegosouzapw#6503) fix(providers): strip reasoning_effort/reasoning from grok-cli requests (diegosouzapw#6288). Integrated into release/v3.8.47.
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.
Closes #6288
Root cause
open-sse/executors/grok-cli.ts::transformRequest()strips a fixedUNSUPPORTEDlist of sampling params (presencePenalty,frequencyPenalty,logprobs,topLogprobs— added for #5273) before forwarding the request body to Grok Build's upstream chat-proxy endpoint (https://cli-chat-proxy.grok.com/v1/chat/completions). It never strippedreasoning_effortor a nestedreasoningobject. Claude Code (routing the Opus slot) sendsreasoning_efforton every request, so every grok-build request 400s upstream. The siblingopen-sse/executors/xai.tsalready solves this class of problem for the separatexaiprovider — grok-cli is a different executor and was missing the same guard.Fix
Added
"reasoning_effort"and"reasoning"to theUNSUPPORTEDstrip list ingrok-cli.ts::transformRequest().TDD evidence (Hard Rule #18)
New file
tests/unit/grok-cli-reasoning-strip-6288.test.ts:reasoningkey assertion failed (true !== false— key was present) and the combined-params test failed onreasoning_effort must be stripped.tests/unit/grok-cli-strip-params.test.ts(fix(grok-cli): strip unsupported params (presencePenalty, etc.) before sending #5273) still passes (2/2) — no regression in the original stripping behavior.node --import tsx/esm --test tests/unit/grok-cli*.test.ts→ 20/20 pass.Gates run green
check-file-size.mjs) — no flag ongrok-cli.tsor the new test filecheck-complexity.mjs) — no flagnpm run typecheck:core) — exit 0eslint --suppressions-location config/quality/eslint-suppressions.json) — exit 0 on both changed filesgrok-cli-strip-params.test.ts, 20/20 pass