A VS Code extension that provides fallback language model support for GitHub Copilot. When your primary AI provider fails, this extension automatically tries the next configured model.
Features
Automatic Fallback: When the primary model fails, automatically switches to backup models
Multiple Configurations: Create and manage multiple fallback configurations
Easy Management: Simple UI to create, update, and delete fallback configurations
Multi-Provider Support: Works with any VS Code language model provider (Copilot, Claude, Gemini, etc.)
Requirements
VS Code 1.104.0 or higher
At least one AI extension installed (GitHub Copilot, Anthropic Claude, etc.)
Installation
Clone this repository or download the .vsix file
Run vsce package to create the extension package
Install the extension: code --install-extension vscode-copilot-fallback-1.0.0.vsix
Usage
Creating a Fallback Configuration
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
Search for "Manage Fallback" and select it
Choose "Create" from the menu
Enter a name for your fallback configuration
Select models from available providers (you can select multiple)
Your fallback is now ready
Updating a Fallback Configuration
Open Command Palette and run "Manage Fallback"
Choose "Update"
Select the configuration you want to modify
Add or remove models as needed
Save changes
Deleting a Fallback Configuration
Open Command Palette and run "Manage Fallback"
Choose "Delete"
Select the configuration to remove
Confirm deletion
How It Works
The extension registers a language model chat provider with the vendor name "fallback". When you use a fallback configuration:
Your message is sent to the first model in the configuration
If that model fails, it automatically tries the next model
This continues until a model succeeds or all models fail
Error details are returned if all models fail
The extension tracks which model was last used for each configuration and continues from there on the next request, providing a round-robin style fallback mechanism.
Configuration
Fallback configurations are stored in VS Code settings under fallback.configs. Each configuration contains:
id: Unique identifier
name: Display name
providers: Array of provider configurations with vendor and modelId
Commands
Command
Description
fallback.manage
Open fallback management UI
Development
# Install dependencies
pnpm install
# Compile TypeScript
pnpm run compile
# Package extension
pnpm run package