Use xAI Grok models directly from the GitHub Copilot Chat model picker in Visual Studio Code.
This extension is a native VS Code LanguageModelChatProvider. It authenticates with xAI, discovers available models, and streams OAuth-backed responses through xAI's Grok CLI inference service into Copilot Chat without a local proxy.
Highlights
- Browser/PKCE and device-code xAI sign-in with token refresh
- Live Grok model discovery
- Model-specific reasoning-effort switcher in Copilot Chat
- Opt-in native xAI web search through a workspace setting
- Streaming text and reasoning
- Agent mode tool calls and image inputs
- Native VS Code context-window accounting from xAI token usage
- Exact per-request and locally accumulated billed spend from xAI
- Clearly labeled request-rate and tokens-per-minute capacity
- Read-only SuperGrok weekly usage, reset date, Extra Usage Credits, and auto top-up status
Quick start
- Install Grok for GitHub Copilot Chat. You need VS Code 1.125 or newer, GitHub Copilot Chat, and an xAI account with API access or an eligible subscription.
- Run Grok: Sign In to xAI from the Command Palette and complete authorization in your browser. Use Grok: Sign In to xAI with Device Code if the browser callback is unavailable.
- Open Copilot Chat, select Manage Models, enable xAI Grok, then choose a Grok model.
Use Grok: Show API Activity and Spend or click the Grok status-bar item to open a compact popup. It shows exact xAI-billed spend and token counts accumulated by this extension on the current device, the latest request, transient API rate capacity, and—when the OAuth account exposes it—the current SuperGrok weekly usage percentage, reset date, Extra Usage Credits, and auto top-up status. Hover the indicator for a quick summary. Tracked totals and the last read-only account snapshot persist across VS Code reloads.
The request and token capacity values are short-window throughput limits (RPS/TPM), not subscription usage or a declining credit balance. The subscription snapshot is read-only and uses the same OAuth-backed Grok client service as model discovery and chat; xAI may change this private account surface. Use Grok: Open Subscription Usage to manage weekly usage, purchase Extra Usage Credits, or configure auto top-up in Grok. Use Grok: Open xAI Console Usage for team/API usage and prepaid API credits.
Use Grok: Manage xAI Connection to inspect usage, test the connection, refresh models, inspect logs, or sign out.
Documentation
Related projects
- Codex Bridge for Copilot Chat — Use OpenAI Codex models in Copilot Chat with a ChatGPT Plus or Pro subscription.
- Poolside for GitHub Copilot Chat — Use hosted Poolside coding models directly from the GitHub Copilot Chat model picker in Visual Studio Code.
Unofficial project; not affiliated with xAI, GitHub, or Microsoft. xAI account limits and charges still apply. Licensed under MIT.