Skip to content

Repository files navigation

Grok and GitHub Copilot

Grok for GitHub Copilot Chat

Use xAI Grok models directly from the GitHub Copilot Chat model picker in Visual Studio Code.

Visual Studio Marketplace version Visual Studio Marketplace installs CI status MIT license

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

  • Browser/PKCE and device-code xAI sign-in with automatic refresh
  • Live Grok model discovery with six-hour persisted models.dev enrichment
  • Streaming text, reasoning, image inputs, and 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
  • Connection management and secret-safe diagnostics

Quick start

  1. 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.
  2. Run Grok: Add xAI Account, choose a profile ID such as personal, and complete authorization.
  3. Open Manage Language Models, choose Add Models, select xAI Grok, and enter the same profile ID.
  4. Repeat those steps for another xAI account, then enable the Grok models you want in Copilot Chat.

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.

Documentation

Related projects

Unofficial project; not affiliated with xAI, GitHub, or Microsoft. xAI account limits and charges still apply. Licensed under MIT.

About

Use xAI Grok models in GitHub Copilot Chat with xAI OAuth

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages