[Feature Request] Add xAI Grok OAuth (SuperGrok / X Premium+) provider for Grok Build / grok-build-0.1 access
Summary
OmniRoute currently supports Grok access primarily through the grok-web web cookie provider (using the sso cookie from grok.com / x.ai web UI).
xAI now offers SuperGrok and SuperGrok Heavy subscription tiers (alongside X Premium+) that unlock Grok Build — a dedicated terminal coding agent — and higher-performance models via a first-class OAuth authentication flow against accounts.x.ai.
This OAuth method is already implemented and in active use in several major tools:
- Hermes Agent — native
xai-oauth / grok-oauth provider (browser PKCE login, auto-refresh)
- OpenCode —
/connect → "xAI Grok OAuth (SuperGrok Subscription)"
- Official Grok Build CLI (https://x.ai/cli)
The OAuth path gives access to subscription-backed models and capabilities (including grok-build-0.1 and advanced Grok 4 variants with reasoning/multi-agent modes) that go beyond what the cookie-based web wrapper or standard xAI API keys provide for coding/agent use cases.
Proposed Feature
Add a new OAuth provider in OmniRoute:
- Provider ID(s):
xai-oauth, grok-oauth, xai-grok-oauth (with aliases)
- Category: OAuth Providers (like
codex, claude, github, cline, kilocode, etc.)
- Auth mechanism: Browser-based OAuth 2.0 PKCE with loopback callback (or device code / manual paste for headless/remote)
- Target:
https://accounts.x.ai for login + token issuance
- Upstream endpoint(s):
https://api.x.ai/v1 (and/or the specific Responses API / codex_responses transport used by Grok Build agents)
- Models exposed:
grok-build-0.1, grok-4.3, reasoning variants (grok-4.20-*-reasoning), image/video/grok-imagine models, etc. (dynamically from catalog where possible)
- Subscription awareness: Note tier differences (standard SuperGrok vs SuperGrok Heavy) where rate limits / model access differ
This should live alongside (not replace) the existing grok-web cookie provider, as they serve slightly different access patterns and user bases.
Why This Matters for OmniRoute
- Unified gateway value: Users who already pay for SuperGrok/Heavy can route that high-quality subscription capacity through OmniRoute's single OpenAI-compatible endpoint (
http://127.0.0.1:20128/v1).
- CLI tool coverage: Immediately benefits all tools that OmniRoute supports (OpenCode, Claude Code, Codex, Cline, Kilo Code, Continue, Hermes itself, etc.) without each tool needing separate native xAI OAuth wiring.
- Combos & resilience: Combine the SuperGrok OAuth connection with other cheap/fast providers using OmniRoute's 14 routing strategies, fallbacks, circuit breakers, cost tracking, etc.
- Consistency: OmniRoute already excels at OAuth providers for coding agents (Codex, Claude Code, etc.). Adding the official xAI Grok OAuth fits the existing pattern perfectly.
- Free-tier / OAuth expansion: Aligns with the "50+ free tiers / OAuth providers" positioning.
References & Prior Art
Suggested Implementation Approach
- Add entry to
OAUTH_PROVIDERS + risk notices (subscriptionRisk: true).
- Implement auth executor / token manager (reuse/refine the recent v3.8.4 OAuth refresh fixes).
- Add dashboard "Sign in with xAI / SuperGrok" flow (browser launch or manual URL + callback paste for remote).
- Update model catalog / pricing for the new models (or mark as dynamic).
- Add to CLI tool detection if needed for auto-config of OpenCode / Hermes / etc.
- Documentation + wiki updates (Provider Reference, etc.).
- Optional: support for multiple xAI OAuth accounts + proxy-per-connection (as done for other multi-account web/OAuth providers).
Additional Notes
- Some SuperGrok tiers may have restrictions (e.g. 403 on certain endpoints for non-Heavy); the implementation should surface clear errors and guidance (similar to Hermes warnings).
- Token storage should follow OmniRoute's existing secure patterns (SQLite + encryption).
- Headless/remote support (SSH port-forward, manual-paste) is highly desirable, matching Hermes and OpenCode UX.
I (and the Hermes community) would be happy to collaborate on the spec, provide token examples, test builds, or review PRs. This is a high-leverage feature for anyone already subscribed to SuperGrok who wants to use OmniRoute as their central router.
Thanks for the incredible work on OmniRoute — it already makes the fragmented AI tool landscape much more manageable.
[Feature Request] Add xAI Grok OAuth (SuperGrok / X Premium+) provider for Grok Build / grok-build-0.1 access
Summary
OmniRoute currently supports Grok access primarily through the
grok-webweb cookie provider (using thessocookie from grok.com / x.ai web UI).xAI now offers SuperGrok and SuperGrok Heavy subscription tiers (alongside X Premium+) that unlock Grok Build — a dedicated terminal coding agent — and higher-performance models via a first-class OAuth authentication flow against
accounts.x.ai.This OAuth method is already implemented and in active use in several major tools:
xai-oauth/grok-oauthprovider (browser PKCE login, auto-refresh)/connect→ "xAI Grok OAuth (SuperGrok Subscription)"The OAuth path gives access to subscription-backed models and capabilities (including
grok-build-0.1and advanced Grok 4 variants with reasoning/multi-agent modes) that go beyond what the cookie-based web wrapper or standard xAI API keys provide for coding/agent use cases.Proposed Feature
Add a new OAuth provider in OmniRoute:
xai-oauth,grok-oauth,xai-grok-oauth(with aliases)codex,claude,github,cline,kilocode, etc.)https://accounts.x.aifor login + token issuancehttps://api.x.ai/v1(and/or the specific Responses API / codex_responses transport used by Grok Build agents)grok-build-0.1,grok-4.3, reasoning variants (grok-4.20-*-reasoning), image/video/grok-imagine models, etc. (dynamically from catalog where possible)This should live alongside (not replace) the existing
grok-webcookie provider, as they serve slightly different access patterns and user bases.Why This Matters for OmniRoute
http://127.0.0.1:20128/v1).References & Prior Art
grok-webentry in providers.src/shared/constants/providers.ts(OAUTH_PROVIDERS section)Suggested Implementation Approach
OAUTH_PROVIDERS+ risk notices (subscriptionRisk: true).Additional Notes
I (and the Hermes community) would be happy to collaborate on the spec, provide token examples, test builds, or review PRs. This is a high-leverage feature for anyone already subscribed to SuperGrok who wants to use OmniRoute as their central router.
Thanks for the incredible work on OmniRoute — it already makes the fragmented AI tool landscape much more manageable.