You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V2: xAI Grok OAuth (SuperGrok subscription) login not supported #34778
The v2 branch does not support logging into xAI with the xAI Grok OAuth (SuperGrok subscription) flow. V1 supports it; V2 has no xAI login method registered.
Part of the systemic V2 provider-login gap (see #34765 for the OpenAI/ChatGPT case).
Evidence
packages/core/src/plugin/provider/xai.ts — no ctx.integration.transform / no method.update, so no OAuth login method is registered. Catalog/SDK only.
Repo-wide, only openai and opencode register OAuth methods in packages/core/src/plugin/provider/.
loader returns a custom fetch that, for OAuth credentials:
single-flight refreshes the rotating refresh_token and persists via client.auth.set,
sets authorization: Bearer <access> and User-Agent: opencode/<version>,
intentionally does not override baseURL (relies on @ai-sdk/xai default https://api.x.ai/v1).
What V2 needs
Register the xAI OAuth login method in xai.ts.
Request-time auth: inject Authorization: Bearer <access> for the OAuth credential (token refresh should route through V2's integration refresh on the method registration, not an inline fetch refresh).
Ideally this is expressed through the shared credential-aware request hook proposed in #34765 (so it works for both the AI SDK and the native @opencode-ai/llm paths) rather than re-porting V1's fetch monkey-patch.
Environment
Branch: v2
Status: verified against source; not runtime-reproduced (requires a SuperGrok subscription).
The likely durable fix should live at the native provider package / provider-resolution seam so OAuth credential metadata and per-provider request headers/base URLs work across the native @opencode-ai/llm path, instead of re-porting one-off V1 fetch monkey-patches.
Audit update (2026-07-08): #34843 only fixed ChatGPT/OpenAI OAuth routing (#34765); it did not add xAI Grok OAuth. This issue remains open and is not resolved by that cross-reference.
Activity
opencode-agent commentedon Jul 2, 2026
Tracker update from V2 TODO LIST audit (2026-07-02):
This is part of the broader V2 provider-login / credential-aware request-routing gap. Please coordinate with:
The likely durable fix should live at the native provider package / provider-resolution seam so OAuth credential metadata and per-provider request headers/base URLs work across the native
@opencode-ai/llmpath, instead of re-porting one-off V1fetchmonkey-patches.opencode-agent commentedon Jul 8, 2026
Audit update (2026-07-08): #34843 only fixed ChatGPT/OpenAI OAuth routing (#34765); it did not add xAI Grok OAuth. This issue remains open and is not resolved by that cross-reference.