Grok for GitHub Copilot Chat
Use xAI Grok models directly from the GitHub Copilot Chat model picker in Visual Studio Code.
This native VS Code LanguageModelChatProvider authenticates with xAI, discovers available models, and streams responses through xAI's Grok inference service into Copilot Chat without a local proxy.
Highlights
- Device-code xAI sign-in (code pre-filled in the browser) with automatic refresh
- Live Grok model discovery with six-hour persisted models.dev enrichment
- Streaming text, reasoning, image inputs, and isolated parallel agent-mode tool calls
- Model-specific reasoning-effort and opt-in Web Search controls
- Native context-window accounting from xAI token usage
- Exact locally accumulated billed spend and rate-capacity display
- Read-only SuperGrok weekly usage, reset, credits, and auto top-up status
- Session-backed account discovery, entry reconciliation, and secret-safe diagnostics
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.
- Open Manage Language Models, choose Add Models, select xAI Grok, and follow the prompts (group name and profile ID). Grok then offers to sign in right away — or run Grok: Add Provider Entry (or Grok: Add xAI Account) yourself; each creates the entry if missing and signs in only when needed.
- Repeat those steps for another xAI account, then enable the Grok models you want in Copilot Chat.
- To pin a repository to one of those accounts, run Grok: Bind Account to This Workspace, or set
"grokCopilot.profile": "work" in .vscode/settings.json.
Composer controls override workspace defaults; reasoning defaults to High when supported and Web Search remains off until enabled. Click the Grok status-bar item to inspect locally tracked spend and tokens, transient API capacity, and any subscription snapshot exposed by the account.
Context token counts are estimates. Tool-result text, tool arguments, thinking, and image inputs are included in context budgeting. If the service rejects a full context window, run /compact in Copilot Chat, reduce attachments or tool output, or start a new chat.
Documentation
Unofficial project; not affiliated with xAI, GitHub, or Microsoft. xAI account limits and charges still apply. Licensed under MIT.