Features
Multiple AI Models
Access all Vercel AI Gateway models including GPT-4o, Claude, Gemini, and more
Native Integration
Works seamlessly with VS Code’s built-in chat interface and Copilot
Streaming Responses
Real-time streaming of AI responses for instant feedback
Tool Calling
Full support for VS Code tool integration and function calling
Installation
Install the extension from the VS Code Marketplace:- Open VS Code
- Go to Extensions (
Cmd/Ctrl + Shift + X) - Search for “Vercel AI Gateway”
- Click Install
Authentication
The extension supports two authentication methods:API Key Authentication
The simplest way to authenticate is with a Vercel AI Gateway API key:- Open Command Palette (
Cmd/Ctrl + Shift + P) - Search for “Vercel AI Gateway: Manage Authentication”
- Select “API Key”
- Enter your API key (starts with
vck_)
You can obtain an API key from the Vercel AI Gateway dashboard.
OIDC Authentication (Vercel CLI)
For enhanced security, you can use OIDC authentication via the Vercel CLI:- Ensure you’re logged in to the Vercel CLI (
vercel login) - Open Command Palette (
Cmd/Ctrl + Shift + P) - Search for “Vercel AI Gateway: Manage Authentication”
- Select “Vercel OIDC”
- Choose your team and project
Usage
Once authenticated, the extension automatically registers as a language model provider in VS Code.Using with VS Code Chat
- Open the Chat panel (
Cmd/Ctrl + Shift + I) - Click the model selector dropdown
- Choose a model from “Vercel AI Gateway”
- Start chatting!
Using with GitHub Copilot Chat
The extension integrates with GitHub Copilot Chat, allowing you to use Vercel AI Gateway models as an alternative to the default Copilot models.Available Models
The extension dynamically fetches available models from the Vercel AI Gateway. Supported models include:| Provider | Models |
|---|---|
| OpenAI | GPT-4o, GPT-4o Mini, GPT-4 Turbo |
| Anthropic | Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku |
| Gemini 1.5 Pro, Gemini 1.5 Flash | |
| And more… | All models supported by Vercel AI Gateway |
- Text generation with streaming
- Tool calling (where supported by the underlying model)
- Token counting
Session Management
The extension supports multiple authentication sessions, allowing you to switch between different API keys or OIDC configurations.Managing Sessions
- Open Command Palette (
Cmd/Ctrl + Shift + P) - Search for “Vercel AI Gateway: Manage Authentication”
- Choose from:
- Add new authentication - Add a new API key or OIDC session
- Switch active session - Switch between existing sessions
- Remove session - Delete a saved session
Troubleshooting
Models not appearing in the chat panel
Models not appearing in the chat panel
- Ensure you’re authenticated (check via “Manage Authentication” command)
- Try reloading VS Code (
Cmd/Ctrl + Shift + P→ “Reload Window”) - Check the Output panel for error messages (select “Vercel AI Gateway” from the dropdown)
OIDC authentication not working
OIDC authentication not working
- Verify you’re logged in to the Vercel CLI:
vercel whoami - If not logged in, run:
vercel login - Ensure the project you selected has AI Gateway enabled
API key authentication failing
API key authentication failing
- Verify your API key starts with
vck_ - Check that your API key has the necessary permissions
- Try removing and re-adding the session
Development
To contribute or run the extension locally:F5 to launch the Extension Development Host.