Product blog
How to set up VS Code to leverage OpenRouter models
Use GitHub Copilot BYOK so VS Code Chat can call OpenRouter catalog models with your own key.
GitHub Copilot BYOK is the most native path when you already rely on Copilot. Business and Enterprise subscribers can configure BYOK in VS Code so teams reuse their own keys to reach models from providers including OpenRouter. After setup, those models are available throughout VS Code Chat, including the built-in plan agent and custom agents. Eligibility and policies evolve—confirm details in GitHub’s official Copilot documentation.
1. Get your OpenRouter API key
- Go to openrouter.ai and sign up (Google or GitHub login available).
- Open Keys and create a new API key.
- Optionally add credits—some free models are available without credits.
- Copy the API key and store it securely.
2. Configure the API key in VS Code
- Open VS Code Settings.
- Search for Chat: Manage Language Models.
- Select OpenRouter as the provider and paste your API key.
- Choose any model from the OpenRouter catalog.
Popular model IDs to try
google/gemini-flash-1.5— fast and inexpensiveanthropic/claude-sonnet-4-5— strong codingdeepseek/deepseek-coder— good for code tasksopenai/gpt-4o-mini— budget-friendly
You may also find promotional or free-tier models that are capable for everyday tasks—check the catalog for current offers.