AIFlowBridge
Use DeepSeek, MiniMax, and Xiaomi MiMo directly in GitHub Copilot Chat. Free multi-provider models with transparent vision proxy, usage metrics, and an OpenAI-compatible local gateway for Kilo Code, Continue, and more.
AIFlowBridge brings together multiple AI providers (DeepSeek, MiniMax, Xiaomi MiMo) under a unified interface inside Copilot Chat - with built-in metrics, proxy routing, and vision bridge capabilities.
Features
Multi-Provider Support
- DeepSeek V4 Pro & Flash - Full capabilities with thinking mode, vision proxy, tool calling
- MiniMax M2 / M2.1 / M2.1 Highspeed / M2.5 / M2.5 Highspeed / M2.7 / M2.7 Highspeed / M3 - 1M-token context on M3, high-speed variants for low-latency workloads
- Xiaomi MiMo V2 Omni / V2 Pro - multimodal and reasoning models
- Xiaomi MiMo V2.5 / V2.5 Pro - multimodal model with native vision and thinking
This list is not exhaustive — see the Providers table below for the canonical list, or use the AIFlowBridge: Add a custom model command to declare additional models from each vendor's /v1/models endpoint without waiting for a release (see Adding a model without waiting for a release).
Transparent Vision Proxy
Text-only models can handle images via automatic proxy through another installed Copilot model (Claude, GPT-4o, etc.). Zero configuration required - just pick your preferred vision model once.
Usage Metrics & Local Gateway
- Built-in OpenAI-compatible proxy on port 8787 (starts automatically, singleton across VS Code instances)
- Request, token, and duration telemetry
- Per-provider and per-model cost estimation
- Metrics dashboard (
Ctrl+Alt+M) with status bar indicator
Copilot Chat Integration
All providers appear directly in the Copilot Chat model picker:
- Agent mode, tool calling, instructions, MCP, skills
- 1M token context on supporting models
- Thinking mode with reasoning effort control (DeepSeek, Xiaomi)
Secure by Default
API keys stored in VS Code's SecretStorage (OS keychain). Never in settings.json, never in Git history.
Why AIFlowBridge?
GitHub Copilot Chat ships with one vendor. AIFlowBridge adds a multi-provider switcher so you can pick the best model for the job, all from the same chat window.
- DeepSeek V4 Pro & Flash - frontier reasoning at a fraction of the cost. 1M token context, tool calling, thinking mode.
- MiniMax M2 → M3 - eight models spanning the M2, M2.1, M2.5, M2.7, and M3 generations, including high-speed variants. M3 ships with a 1M-token context window.
- Xiaomi MiMo V2 Omni / V2 Pro / V2.5 / V2.5 Pro - open-weight multimodal and reasoning models.
Want to use a model not in this list? Run AIFlowBridge: Add a custom model from the Command Palette to add any model returned by the provider's /v1/models endpoint — see Adding a model without waiting for a release.
Compared to running each provider's CLI or website, AIFlowBridge gives you:
- One place to switch models in Copilot Chat (no copy-pasting code between sites)
- Local OpenAI-compatible gateway so Kilo Code, Continue, Open WebUI, and any OpenAI-compatible client can use the same models
- Per-request metrics: token counts, latency, estimated cost - visible in the dashboard
- Vision proxy for text-only models: paste an image and the description is injected automatically
- Local-first: API keys live in your OS keychain, telemetry stays on your machine
Providers
| Provider |
Models |
Vision |
Thinking |
Tool Calling |
| DeepSeek |
V4 Flash, V4 Pro |
✅ Proxied |
✅ |
✅ |
| MiniMax |
M2, M2.1, M2.1 Highspeed, M2.5, M2.5 Highspeed, M2.7, M2.7 Highspeed, M3 |
✅ Proxied |
✅ |
✅ |
| Xiaomi |
MiMo V2 Omni, V2 Pro, V2.5, V2.5 Pro |
✅ Proxied |
✅ |
✅ |
Note: All models expose the image-paste button in Copilot Chat (imageInput: true). Images are transparently converted to text descriptions by the vision proxy (a separate vision-capable model). Configure the vision model with AIFlowBridge: Set vision proxy model or via aiflowbridge.vision.copilotVisionModel.
Why is the model list hardcoded?
The list of officially supported models lives in src/consts.ts and is not auto-discovered from the upstream APIs. This is a deliberate design choice driven by VS Code's vscode.lm.registerLanguageModelChatProvider API.
VS Code requires each model to declare its capabilities at registration time:
maxInputTokens and maxOutputTokens (context window)
toolCalling — true, false, or a numeric limit on simultaneous tools
imageInput — whether the paste-image button appears in Copilot Chat
thinking — whether the thinking-effort selector is exposed
requiresThinkingParam — provider-specific quirks (e.g. DeepSeek's thinking: { type: "enabled" })
The upstream APIs (GET /v1/models) only return { id, owned_by, created }. They do not expose context window, tool limits, vision support, or thinking support in a usable format. Without explicit capabilities, VS Code would:
- Hide the image-paste button for vision-capable models
- Expose tool calling for models that don't support it (broken UX)
- Skip the thinking-effort selector for reasoning models
- Allow context overflow with no warning
A bad capability is a worse user experience than a missing model. Hardcoding ensures every supported model works end-to-end on day one.
Convention : the id field in MODELS is the upstream API id itself (e.g. MiniMax-M2.7, mimo-v2.5-pro), not a kebab-case VS Code alias. The picker shows the human-readable name field. This avoids any id translation layer between VS Code and the upstream API.
Adding a model without waiting for a release
You do not need a new AIFlowBridge release to use a newly released provider model. Two options:
Option 1 — Command Palette (easiest)
Run AIFlowBridge: Add a custom model from the Command Palette. The command:
- Asks which provider to query
- Fetches the model list from the provider's
/v1/models endpoint (using your stored API key)
- Lets you pick a model from the list
- Lets you pick its capabilities (tool calling, vision, thinking) with simple Yes/No prompts
- Saves the entry to your
aiflowbridge.userModels setting
The new model appears in the Copilot Chat picker immediately. You can edit or remove the entry in your user settings at any time.
Option 2 — Direct setting
Add an entry to settings.json under aiflowbridge.userModels:
{
"aiflowbridge.userModels": [
{
"id": "minimax-m3",
"name": "MiniMax M3",
"family": "minimax",
"version": "m3",
"maxInputTokens": 1000000,
"maxOutputTokens": 128000,
"capabilities": {
"toolCalling": true,
"imageInput": true,
"thinking": false
},
"requiresThinkingParam": false
}
]
}
Trade-off : user-declared models are your responsibility. If you mark imageInput: true for a model that does not accept images, the Copilot Chat paste button will appear but the model will fail on upload. Capabilities are not validated against the upstream API.
If a user-defined model is widely useful, the recommended path is to add it to the official registry in src/consts.ts via a pull request. The PR will be reviewed for:
- Correct
id matching the upstream API exactly (use AIFlowBridge: Add a custom model or curl /v1/models to confirm)
- Correct capabilities (especially image input and thinking)
- Matching
maxInputTokens / maxOutputTokens from the provider's documentation
- Translation key in
package.nls.json (model.<id>.detail)
- Entry in the Providers table above
The release cadence is opportunistic — no fixed schedule. Tag v1.x.y when a meaningful set of changes accumulates.
Installation
Prerequisites
- VS Code 1.90 or later
- GitHub Copilot subscription (Free / Pro / Enterprise)
- At least one API key from a supported provider
Install the Extension
- Open VS Code
- Go to Extensions (
Ctrl+Shift+X)
- Search for "AIFlowBridge"
- Click Install
Or install from the VS Code Marketplace.
Run the appropriate command from the Command Palette (Ctrl+Shift+P):
DeepSeek: Set API Key
MiniMax: Set API Key
Xiaomi MiMo: Set API Key
API keys are stored securely in your OS keychain via VS Code's SecretStorage.
Demo
Once installed, the metrics dashboard is one keyboard shortcut away: press Ctrl+Alt+M (or Cmd+Alt+M on macOS), or run AIFlowBridge: Show metrics dashboard from the Command Palette.
The dashboard shows:
- Totals: requests, prompt/completion tokens, estimated cost
- Per-provider breakdown: requests and tokens by DeepSeek / MiniMax / Xiaomi
- Per-model breakdown: the same, sliced by model ID
- Recent requests table: timestamp, model, tokens, latency, status
The status bar shows the current gateway state (running / stopped / error).
Example workflow
- Open Copilot Chat and pick
DeepSeek V4 Pro from the model picker
- Ask it a coding question with thinking enabled - watch the status bar for request count
- Open the dashboard with
Ctrl+Alt+M to inspect token usage and cost per request
- Switch to
Xiaomi MiMo V2.5 and ask a follow-up - the same metrics, grouped by model
- Run
AIFlowBridge: Show logs to inspect any errors in detail
Usage
Basic Usage
- Set at least one API key (see above)
- Open Copilot Chat (
Ctrl+Shift+I or click the chat icon)
- Click the model picker at the top of the chat
- Select a model from DeepSeek, MiniMax, or Xiaomi
- Start chatting - all Copilot features (agent mode, tools, etc.) work automatically
Vision Proxy
For text-only models (DeepSeek, MiniMax), images are automatically proxied through another model:
- Drop an image into Copilot Chat
- AIFlowBridge sends it to a vision-capable model for description
- The description is injected into the text-only model's prompt
To change the vision proxy model:
AIFlowBridge: Set vision proxy model
Gateway (Optional)
The local gateway provides an OpenAI-compatible proxy that can be used by external tools. It starts automatically on port 8787 when the extension activates (if aiflowbridge.gateway.enabled is true).
The gateway operates as a singleton shared across all VS Code instances. If another VS Code window already has an active AIFlowBridge gateway, the new window will detect and reuse it instead of starting a second instance.
# Health check
curl http://127.0.0.1:8787/health
# List available models
curl http://127.0.0.1:8787/v1/models
# View metrics
curl http://127.0.0.1:8787/metrics
Using with Kilo Code or Other OpenAI-Compatible Clients
Any tool that supports the OpenAI API can use AIFlowBridge as a backend via the gateway. This lets you access DeepSeek, MiniMax, and Xiaomi MiMo models from clients other than Copilot Chat.
Gateway singleton behavior: The gateway runs as a single instance shared across all VS Code windows. If an AIFlowBridge gateway is already running when you open a new VS Code window, that window will automatically detect and use the existing gateway on port 8787 instead of starting a second instance. This ensures the gateway is always available at the same URL.
Kilo Code configuration example:
| Setting |
Value |
| API Provider |
OpenAI Compatible |
| Base URL |
http://127.0.0.1:8787/v1 |
| API Key |
Any string (keys are managed by AIFlowBridge) |
| Model |
deepseek-chat, MiniMax-M2.7, mimo-v2.5, etc. |
The gateway routes requests to the correct upstream provider based on the model name. Streaming (stream: true) is fully supported.
Configuring Gateway Providers
Gateway providers are configured in VS Code settings (settings.json):
{
"aiflowbridge.providers": [
{
"id": "deepseek-flash",
"label": "DeepSeek Flash",
"kind": "openai-compat",
"baseUrl": "https://api.deepseek.com",
"model": "deepseek-v4-flash",
"apiKey": "sk-..."
},
{
"id": "minimax",
"label": "MiniMax M2.7",
"kind": "openai-compat",
"baseUrl": "https://api.minimax.io/v1",
"model": "MiniMax-M2.7",
"apiKey": "..."
},
{
"id": "MiMo",
"label": "Xiaomi MiMo V2.5 Pro",
"kind": "openai-compat",
"baseUrl": "https://token-plan-ams.xiaomimimo.com/v1",
"model": "MiMo-V2.5-PRO",
"apiKey": "..."
}
]
}
Metrics Dashboard
Press Ctrl+Alt+M or run:
AIFlowBridge: Show metrics dashboard
The dashboard shows:
- Total requests, tokens, and estimated cost
- Per-provider and per-model breakdown
- Recent request history with latency
- Gateway status
Settings
Gateway
| Setting |
Default |
Description |
aiflowbridge.gateway.enabled |
true |
Start gateway on activation |
aiflowbridge.gateway.port |
8787 |
Local proxy port |
aiflowbridge.gateway.baseUrl |
http://127.0.0.1:8787/v1 |
Gateway URL |
aiflowbridge.gateway.defaultModel |
"" |
Default model when client doesn't specify one |
Providers (Gateway Upstream)
| Setting |
Default |
Description |
aiflowbridge.providers |
[] |
Array of upstream provider profiles |
aiflowbridge.providers.deepseek.baseUrl |
https://api.deepseek.com |
DeepSeek API endpoint |
aiflowbridge.providers.deepseek.maxTokens |
0 |
Max output tokens (0 = no limit) |
aiflowbridge.providers.deepseek.modelIdOverrides |
{} |
DeepSeek model ID overrides |
aiflowbridge.providers.minimax.baseUrl |
https://api.minimax.io/v1 |
MiniMax API endpoint |
aiflowbridge.providers.minimax.maxTokens |
0 |
Max output tokens (0 = no limit) |
aiflowbridge.providers.minimax.modelIdOverrides |
{} |
MiniMax model ID overrides |
aiflowbridge.providers.minimax.temperature |
1 |
Sampling temperature for MiniMax |
aiflowbridge.providers.minimax.topP |
0.95 |
Top-p sampling for MiniMax |
aiflowbridge.providers.minimax.reasoningSplit |
true |
Split reasoning into separate field |
aiflowbridge.providers.xiaomi.baseUrl |
https://api.xiaomimimo.com/v1 |
Xiaomi MiMo API endpoint |
aiflowbridge.providers.xiaomi.maxTokens |
0 |
Max output tokens (0 = no limit) |
aiflowbridge.providers.xiaomi.modelIdOverrides |
{} |
Xiaomi MiMo model ID overrides |
aiflowbridge.providers.xiaomi.reasoningRequiredForToolCalls |
true |
Replay reasoning_content in tool-call followups |
Vision Proxy
| Setting |
Default |
Description |
aiflowbridge.vision.excludedVendors |
["aiflowbridge"] |
Vendors that should NOT use the vision proxy |
aiflowbridge.vision.copilotVisionModel |
oswe-vscode-prime |
Vision model for GitHub Copilot |
aiflowbridge.vision.prompt |
(built-in) |
Custom prompt for image description |
Telemetry
| Setting |
Default |
Description |
aiflowbridge.telemetry.enabled |
true |
Enable usage tracking |
aiflowbridge.telemetry.logRequests |
true |
Log each request |
Diagnostics
| Setting |
Default |
Description |
aiflowbridge.debugMode |
minimal |
minimal, metadata, or verbose |
Commands
In the Command Palette, the provider key commands are grouped under the AIFlowBridge category. If you do not see them immediately, search for set api.
| Command |
Description |
| AIFlowBridge |
|
AIFlowBridge: Show metrics dashboard |
Open metrics dashboard |
AIFlowBridge: Refresh metrics |
Refresh status bar |
AIFlowBridge: Start local gateway |
Start proxy |
AIFlowBridge: Stop local gateway |
Stop proxy |
AIFlowBridge: Copy gateway URL |
Copy URL to clipboard |
AIFlowBridge: Open settings |
Open extension settings |
AIFlowBridge: Set vision proxy model |
Choose vision model |
AIFlowBridge: Show logs |
Open output log |
| DeepSeek |
|
DeepSeek: Set API Key |
Configure API key |
DeepSeek: Clear API Key |
Remove stored key |
| MiniMax |
|
MiniMax: Set API Key |
Configure API key |
MiniMax: Clear API Key |
Remove stored key |
| Xiaomi MiMo |
|
Xiaomi MiMo: Set API Key |
Configure API key |
Xiaomi MiMo: Clear API Key |
Remove stored key |
Architecture
AIFlowBridge
├── src/aiflowbridge/ # Gateway, telemetry, UI
│ ├── gateway/server.ts # OpenAI-compatible proxy
│ ├── telemetry.ts # Usage tracking & cost estimation
│ ├── ui/dashboard.ts # Metrics webview
│ ├── ui/statusbar.ts # Status bar indicator
│ ├── config.ts # Settings loader (includes userModels)
│ └── types.ts # Shared types
├── src/provider/ # Language model providers
│ ├── base.ts # Abstract provider base class (merges MODELS + userModels)
│ ├── index.ts # DeepSeek provider
│ ├── minimax.ts # MiniMax provider (with model ID translation map)
│ ├── xiaomi.ts # Xiaomi provider
│ ├── runtime/addCustomModel.ts # "Add a custom model" command
│ └── vision/ # Transparent vision proxy
│ ├── model.ts # Vision model selection
│ └── resolve.ts # Image resolution
├── src/runtime/ # Extension lifecycle
│ ├── lifecycle.ts # Activation & deactivation
│ ├── provider.ts # Provider registration
│ ├── commands.ts # Command handlers
│ └── actions.ts # URI action handlers
└── src/consts.ts # Model registry & constants (hardcoded MODELS, see "Why is the model list hardcoded?" above)
Model registry
The list of officially supported models is hardcoded in src/consts.ts under MODELS: ModelDefinition[]. This is intentional — see Why is the model list hardcoded? above. The runtime merges this list with user-declared models from the aiflowbridge.userModels setting on every read. Adding a new model without a release is supported via the AIFlowBridge: Add a custom model command or by editing the aiflowbridge.userModels setting directly.
Development
Prerequisites
Build
# Install dependencies
npm install
# Compile TypeScript (cleans out/ first)
npm run compile
# Watch mode - recompiles on file changes
npm run watch
Run in Development Host
- Open the project in VS Code
- Press
F5 to launch the Extension Development Host
- A new VS Code window opens with the extension loaded from source
- Make changes, then reload the window (
Ctrl+Shift+R) to pick them up
Package & Install
# Build a .vsix package (output in dist/)
npm run package
# Install locally via CLI
code --install-extension dist/aiflowbridge-<VERSION>.vsix
Or install manually: open VS Code → Extensions → ... menu → Install from VSIX... → select the file in dist/.
For repeatable local updates, use the helper script in _helpers/Publish-AIFlowBridge.ps1:
# Build, package, and install into the active profile
.\_helpers\Publish-AIFlowBridge.ps1
# Build, package, and install into every profile folder found on this machine
.\_helpers\Publish-AIFlowBridge.ps1 -AllProfiles
Interactive mode
If you run the helper without -Profiles or -AllProfiles, the script will detect available local profiles and prompt you to pick which profiles should receive the VSIX (you can type indices like 1,3 or a for all). This makes it easier to push local builds into selected profiles during development.
Publish
# Requires a Personal Access Token for the VS Code Marketplace
npm run publish
Troubleshooting
Gateway failed to start on port 8787
Another service (not AIFlowBridge) is using port 8787. Either stop that service, or change AIFlowBridge's port via aiflowbridge.gateway.port in your settings.
API key not configured
Run the matching command from the Command Palette:
DeepSeek: Set API Key
MiniMax: Set API Key
Xiaomi MiMo: Set API Key
The keys live in your OS keychain, not in any file. Use the corresponding Clear API Key command to remove them.
Vision model not found
The configured vision model is not registered with VS Code. Open settings (AIFlowBridge: Open settings) and either:
- Clear
aiflowbridge.vision.copilotVisionModel to use the default
- Pick a model that is currently installed in your environment
401 Unauthorized from an upstream provider
The API key is missing, invalid, or for the wrong endpoint. Check:
- The key is set (
AIFlowBridge: Set API Key)
- The
baseUrl setting points to the right region (DeepSeek/MiniMax/Xiaomi each have regional endpoints)
- The key has the required permissions on the provider's dashboard
Gateway not detected by Kilo Code / Continue
- Confirm the gateway is running:
curl http://127.0.0.1:8787/health should return {"ok":true,"service":"AIFlowBridge"}
- Use
http://127.0.0.1:8787/v1 as the OpenAI-compatible base URL
- Any string works as the API key (auth is handled by the upstream provider)
For more details, run AIFlowBridge: Show Logs from the Command Palette.
Privacy & Security
AIFlowBridge is local-first by design:
- API keys are stored exclusively in VS Code
SecretStorage (your OS keychain). They never appear in settings.json, in Git history, or in any file you commit.
- The gateway binds to
127.0.0.1 only - it is not reachable from other machines on your network.
- Telemetry is local: request counts, token usage, and cost estimates stay on your machine. There is no remote analytics endpoint.
- No third-party tracking: the extension does not phone home, load remote scripts, or embed analytics SDKs.
- Outbound requests only go to the API endpoints you configure:
api.deepseek.com, api.minimax.io, api.xiaomimimo.com, or your custom upstream URLs.
You can audit the network traffic from the AIFlowBridge: Show Logs output channel.
Report security issues privately - see SECURITY.md.
Maintainer
Laurent Ongaro - Laurent Ongaro
AIFlowBridge is free, open-source, and ad-free. If it saves you time or money, consider supporting its development.
Why sponsor?
- No tracking, no ads, no paywalls - the extension stays free for everyone
- Your sponsorship funds continued maintenance, new providers, and bug fixes
- You get direct input on the roadmap (Community tier and above)
- You're supporting an indie developer who builds tools for the community
What your sponsorship funds:
- Development time for new providers and features
- Hosting and CI infrastructure for the marketplace builds
- Documentation, troubleshooting guides, and community support
Sponsorship platforms:
Sponsors and backers (thank you!):
This section is updated with each release. Become a sponsor to have your name listed here.
License
MIT