Skip to content

huggingface/huggingface-vscode-chat

Repository files navigation

🤗 Hugging Face Provider for GitHub Copilot Chat

Demo

Use frontier open LLMs like Kimi K2, DeepSeek V3.1, GLM 4.5 and more in VS Code with GitHub Copilot Chat powered by Hugging Face Inference Providers 🔥


⚡ Quick Start

  1. Install the HF Copilot Chat extension here.
  2. Open VS Code's chat interface.
  3. Click the model picker and click "Manage Models...".
  4. Select "Hugging Face" provider.
  5. Provide your Hugging Face Token, you can get one in your settings page. You only need to give it the inference.serverless permissions.
  6. Choose the models you want to add to the model picker. 🥳

Each model entry also offers cheapest and fastest mode for each model. fastest selects the provider with highest throughput and cheapest selects the provider with lowest price per output token.

✨ Why use the Hugging Face provider in Copilot

  • Access SoTA open-source LLMs with tool calling capabilities.
  • Single API to switch between multiple providers: Cerebras, Cohere, Fireworks AI, Groq, HF Inference, Hyperbolic, Nebius, Novita, Nscale, SambaNova, Together AI, and more. See the full list of partners in the Inference Providers docs.
  • Built for high availability (across providers) and low latency.
  • Transparent pricing: what the provider charges is what you pay.

💡 The free Hugging Face user tier gives you a small amount of monthly inference credits to experiment. Upgrade to Hugging Face PRO or Enterprise for $2 in monthly credits plus pay-as-you-go access across all providers!


Requirements

  • VS Code 1.104.0 or higher.
  • Hugging Face access token with inference.serverless permissions.

🏢 Billing to a Team or Enterprise organization

Team and Enterprise organizations can centralize Inference Providers billing: every member keeps using their own access token, but the requests are charged to the organization instead of the individual account.

Enable it from the extension:

  1. Open the chat model picker → Manage Models…Hugging Face.
  2. Choose Bill to an Organization and enter your organization name (e.g. my-org).

Or set it directly in your VS Code settings:

// settings.json
"huggingface.billTo": "my-org"

The extension forwards this value as the X-HF-Bill-To header on inference requests.

Resource groups. Enterprise organizations with Resource Groups can attribute inference costs to a specific group by entering the resource group ID instead of the organization name. Your token must be a member of that resource group.

ℹ️ Your access token must belong to the organization. Usage is tracked on the organization's billing page, where admins can set a spending limit and disable specific providers. Team & Enterprise organizations also receive a pool of free monthly credits based on the number of seats.

🛠️ Development

git clone https://github.com/huggingface/huggingface-vscode-chat
cd huggingface-vscode-chat
npm install
npm run compile

Press F5 to launch an Extension Development Host.

Common scripts:

  • Build: npm run compile
  • Watch: npm run watch
  • Lint: npm run lint
  • Format: npm run format

📚 Learn more


Support & License

About

A VSCode extension to use Hugging Face Inference Providers in Copilot Chat

Resources

License

Stars

89 stars

Watchers

4 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors