Repository navigation
fix(xai): report a current Grok CLI version on the OAuth path - #6341
Conversation
xAI now answers Grok OAuth requests that report a client version below 1.0.13 with HTTP 426 ("Your Grok CLI version (0.2.93) is outdated"), so every SuperGrok OAuth request failed. Report 1.0.25, the current stable Grok CLI, in x-grok-client-version and the User-Agent.
Carries #6339.
Co-authored-by: unsafe9 <24631203+unsafe9@users.noreply.github.com>
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. |
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Maintainer integration into |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04b7a4f114
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| export const XAI_GROK_COMPATIBILITY = { | ||
| version: "0.2.93", | ||
| userAgent: "opencodex-grok/0.2.93", | ||
| version: "1.0.25", |
There was a problem hiding this comment.
Pin the accepted Grok client version independently
Add a focused regression that independently asserts the reported version is at least the upstream-required 1.0.13 floor (or pins the supported 1.0.25 profile). The existing assertions in tests/providers/xai/xai-transport.test.ts and the quota tests derive their expectations from XAI_GROK_CLIENT_VERSION, so they passed with 0.2.93 and still pass after this edit; reverting or downgrading the constant would therefore recreate the OAuth-wide HTTP 426 failure without making the suite red.
AGENTS.md reference: AGENTS.md:L448-L452
Useful? React with 👍 / 👎.
| version: "1.0.25", | ||
| userAgent: "opencodex-grok/1.0.25", |
There was a problem hiding this comment.
Document the new Grok compatibility floor
Update the owned structure documentation for this transport change. structure/providers/xai-grok.md currently records only that a single compatibility-profile constant exists, but not the newly load-bearing 1.0.13 upstream floor or the 1.0.25 profile reported here; without that update, the source-owner documentation omits the invariant whose violation disables every OAuth request.
AGENTS.md reference: src/AGENTS.md:L11-L11
Useful? React with 👍 / 👎.
…jun#6341) * fix(xai): report a current Grok CLI version on the OAuth path xAI now answers Grok OAuth requests that report a client version below 1.0.13 with HTTP 426 ("Your Grok CLI version (0.2.93) is outdated"), so every SuperGrok OAuth request failed. Report 1.0.25, the current stable Grok CLI, in x-grok-client-version and the User-Agent. Carries lidge-jun#6339. Co-authored-by: unsafe9 <24631203+unsafe9@users.noreply.github.com> * test(xai): pin Grok compatibility header regression --------- Co-authored-by: unsafe9 <24631203+unsafe9@users.noreply.github.com> (cherry picked from commit 6f2f6ae)
Summary
xAI now rejects Grok OAuth (SuperGrok) requests that report a client version below 1.0.13 with HTTP 426:
Your Grok CLI version (0.2.93) is outdated. Please update to version 1.0.13 or later. OpenCodex hardcoded0.2.93inXAI_GROK_COMPATIBILITY, which feedsx-grok-client-versionand theUser-Agenton the OAuth path, so every Grok OAuth request failed. This was reproduced on 2026-10-01 through the running proxy (an Aside agent session routed to xAI returned exactly that 426).This reports
1.0.25, the current stable Grok CLI (grok 1.0.25 (f7e67d6988e2) [stable]from the official installer). The quota probe derives from the same constant.Carries #6339 by @unsafe9, which proposed 1.0.22; this uses the newer stable release.
Co-authored-by: unsafe9 24631203+unsafe9@users.noreply.github.com
Verification
bun test tests/providers/xai/xai-transport.test.ts tests/server/server-xai-responses-streaming.test.ts tests/server/server-xai-chat-reasoning-streaming.test.ts: 58 pass / 0 fail.bun test tests/providers/provider-quota.test.ts tests/providers/provider-account-quota.test.ts: 238 pass / 0 fail.bun x tsc --noEmitpasses.devtip.Checklist