Add xAI Grok subscription OAuth#773
Draft
pridemusvaire wants to merge 4 commits into
Draft
Conversation
Operators can connect SuperGrok / eligible X Premium+ via device-code OAuth from Settings and setup; the inference gateway prefers a refreshed OAuth bearer for xai/ models and falls back to XAI_API_KEY.
pridemusvaire
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
July 25, 2026 02:01
Contributor
|
Review blocked: the fork source branch could not be fetched in this checkout, so the current head cannot be verified against repository context. See task
Reviewed 17fc504 |
Assert disconnect deletes the encrypted secret and sandbox runtime env emits R_INFERENCE_GATEWAY_XAI without shipping tokens when only SuperGrok OAuth is connected.
pridemusvaire
marked this pull request as draft
July 25, 2026 03:14
Inject SuperGrok access tokens as XAI_API_KEY for non-gateway OpenCode (API-key shaped provider), and add refresh-failure, worker rebase, and command token-strip coverage.
Bring the feature branch up to date with the latest base branch.
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.
Summary
XAI_API_KEYpath).xai-oauthstrategy prefers a refreshed OAuth bearer forxai/models and falls back toXAI_API_KEYwhen only the key is configured.Test plan
xaiSubscriptionConnected/xaiApiKeyConnectedcheck-types:fast+ lint + knip via pre-push