A VS Code extension that provides Microsoft Foundry LLM models as chat model providers for GitHub Copilot Chat.
Features
- Integrates Microsoft Foundry LLM models into VS Code's chat interface
- Supports streaming responses for real-time interaction
- Configurable models with customizable parameters
- Supports multimodal input (images) for compatible models
- Tool/function calling support
- Secure API key storage using VS Code's secret storage
Setup
-
Install dependencies:
npm install -
Build the extension:
npm run build -
Configure the extension:
- Open VS Code Settings
- Set
foundryModelProvider.endpointto your Foundry API endpoint (e.g.,https://your-service.services.ai.azure.com/openai/v1) - Run command "Foundry Model Provider: Set API Key" to securely store your API key
-
Configure models (optional):
- Customize
foundryModelProvider.modelsin settings to add/modify available models
- Customize
Configuration
Settings
| Setting | Description | Default |
|---|---|---|
foundryModelProvider.endpoint |
Microsoft Foundry API endpoint URL | "" |
foundryModelProvider.models |
List of available models to register | See below |
foundryModelProvider.defaultParameters |
Default parameters for requests | { temperature: 0.2, topP: 1.0 } |
Model Configuration
Each model in foundryModelProvider.models can have:
"foundryModelProvider.models": [
{
"id": "DeepSeek-V4-Flash",
"name": "DeepSeek-V4-Flash",
"family": "Foundry",
"version": "2026-04-23",
"maxInputTokens": 1000000,
"maxOutputTokens": 128000,
"capabilities": {
"imageInput": true,
"toolCalling": true,
"thinking": true
},
"apiType": "completions",
"reasoningEffort": "high"
},
{
"id": "gpt-5.3-codex-1",
"name": "GPT-5.3-Codex-1",
"family": "Foundry",
"version": "2026-02-24",
"maxInputTokens": 400000,
"maxOutputTokens": 128000,
"capabilities": {
"imageInput": true,
"toolCalling": true,
"thinking": true
},
"apiType": "responses",
"reasoningEffort": "high"
},
{
"id": "gpt-5.4-mini",
"name": "GPT-5.4-mini",
"family": "Foundry",
"version": "2026-03-17",
"maxInputTokens": 400000,
"maxOutputTokens": 128000,
"capabilities": {
"imageInput": true,
"toolCalling": true,
"thinking": true
},
"apiType": "responses",
"reasoningEffort": "xhigh"
},
{
"id": "gpt-4.1",
"name": "GPT-4.1",
"family": "Foundry",
"version": "2025-04-14",
"maxInputTokens": 1000000,
"maxOutputTokens": 32768,
"capabilities": {
"imageInput": true,
"toolCalling": true,
"thinking": false
},
"apiType": "responses"
}
]
Commands
- Foundry Model Provider: Set API Key - Securely store your API key
- Foundry Model Provider: Clear API Key - Remove stored API key
- Foundry Model Provider: Refresh Models - Refresh model configuration
Development
Building
# One-time build
npm run build
# Watch mode for development
npm run watch
Packaging
Before packaging, ensure you have @vscode/vsce installed (included in devDependencies).
Package Commands
# Install dependencies (including @vscode/vsce)
npm install
# Create a .vsix package for local distribution
npm run pack
# Create a pre-release .vsix package
npm run pack:pre
# Publish to VS Code Marketplace (requires authentication)
npm run publish
Output: .vsix file will be generated in the project root directory.
Using the Package
Install the extension locally in VS Code:
code --install-extension foundry-model-provider-0.1.0.vsix
Or manually:
- Open VS Code
- Go to Extensions panel (Ctrl+Shift+X)
- Click "..." → "Install from VSIX..."
- Select the
.vsixfile
Debugging
- Open this folder in VS Code
- Press F5 to launch the Extension Development Host
- The extension will activate when you open Copilot Chat
API
This extension uses the vscode.lm.registerLanguageModelChatProvider API to register Foundry models with VS Code. Models appear under the "foundry" vendor in the model selector.
License
MIT