AIFlowBridge
100+ AI models through one free local gateway. Use GPT-5.6, Claude Opus 4.8, Gemini 3.8 Flash, Llama 4 Maverick, MiniMax M3, DeepSeek V4, Qwen 3.7 Max, Z.ai GLM 5.3, MoonshotAI Kimi K3, and the rest of the OpenAI-compatible world in GitHub Copilot Chat, Kilo Code, Continue, Open WebUI, and JetBrains AI Assistant.
Smart routing, shared session replay, and live cost tracking included.
AIFlowBridge 2.24.0 - data snapshot 2026-10-01.
Model ids and pricing throughout this README are pinned to this snapshot.
Refresh per release; verify against the live OpenRouter catalog (https://openrouter.ai/api/v1/models) before quoting numbers externally. See docs/providers.md#data-freshness for the full refresh policy.
Runs as a VS Code extension or as a standalone Node.js binary (~30 MB RAM).
🌟 What is new in v2.24.0: the Google AI Studio route is BYOK only
- The Google product OAuth transport has been removed. The Antigravity / Cloud Code Assist route is gone from the product, along with its token manager, discovery, PKCE helper and shipped OAuth credentials. Git history is not rewritten.
- A stale Google OAuth profile is refused locally, before any upstream call. A request aimed at the retired host answers HTTP 503 with the stable code
google_product_oauth_unsupported, before credential resolution, before any network hop, and with no browser and no quota header. There is no implicit fallback to the API-key route, because that changes what you are billed for.
- Two cleanup commands:
AIFlowBridge: Delete local Google product OAuth credentials (CLI: aiflowbridge-server auth googleaistudio --logout) purges the local antigravity slot without touching your Gemini key, and AIFlowBridge: Migrate Google AI Studio off the retired OAuth route to the Gemini API rewrites the base URL after an explicit confirmation.
- A bare
RESOURCE_EXHAUSTED is no longer read as zero-allocation. Quota classification now requires positive evidence, so a momentary rate limit is no longer sent to a console change.
🌟 What was new in v2.19.0: Model Catalog Refresh & Direct Gateway Vendors (Z.ai & MoonshotAI)
- 38 Bundled Models across 7 Active Providers: Refreshed against the 2026-10-01 upstream generations with up-to-date pricing, context limits, and capabilities.
- New Direct Gateway Vendors (Z.ai & MoonshotAI): Connect Z.ai GLM 5.3 (
glm-5.3, glm-5.3-flash, glm-5.3-flashx) and MoonshotAI Kimi (kimi-k3, kimi-k2.7-code, kimi-k2.7-code-highspeed, kimi-k2.6) directly at http://127.0.0.1:8787/v1 with dedicated Set API Key / Clear API Key commands and env vars.
- Upgraded Direct Flagships: DeepSeek V4.1 Flash (
deepseek-flash at $0.30/M in, multimodal), MiniMax M3.1 Flash Preview, Xiaomi MiMo V2.6 suite (v2.6-flash from $0.10/M in, v2.6-pro, v2.6-pro-ultraspeed), and Google Gemini latest aliases (gemini-flash-latest, gemini-flash-lite-latest).
- 15 Fresh OpenRouter Free Models: Bundled with $0/M telemetry pricing for instant zero-cost experimentation (Nemotron 3 Ultra 550B, Gemma 4 31B, North Mini Code, Inkling, etc.).
- Always-On Thinking Compatibility: Seamless support for frontier thinking models (GLM 5.3, Kimi K3) with automatic
reasoning_effort pass-through.
🚀 Quick start: OpenRouter, Direct Vendors, or Google Gemini in 3 steps
1. Grab a key:
2. Plug it in:
- VS Code:
Ctrl+Shift+P -> AIFlowBridge: Add a custom model (OpenRouter), Google AI Studio: Set API Key, Z.ai GLM: Set API Key, MoonshotAI Kimi: Set API Key, DeepSeek: Set API Key, etc.
- Standalone CLI:
export AIFLOWBRIDGE_OPENROUTER_API_KEY=sk-or-v1-... or export AIFLOWBRIDGE_ZAI_API_KEY=... then start the gateway.
- Or drop the keys in
<storageDir>/secrets.json: that directory is AIFLOWBRIDGE_DATA_DIR if set, otherwise the VS Code extension's globalStorage folder if it exists on this machine, otherwise ~/.aiflowbridge/.
3. Use it from any OpenAI-compatible client (Kilo Code, Continue, Open WebUI, JetBrains AI Assistant, curl, ...):
curl http://127.0.0.1:8787/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model": "glm-5.3", "messages": [{"role": "user", "content": "ping"}]}'
Swap the model field for any id at openrouter.ai/models, direct providers (deepseek-flash, MiniMax-M3, mimo-v2.6-flash, glm-5.3, kimi-k3), or Gemini (gemini-3.8-flash) - the gateway forwards it verbatim. No AIFlowBridge update needed for new models.
AIFlowBridge is the multi-model local AI gateway you control, bridging OpenRouter (100+ models) and direct frontier providers (Google Gemini, DeepSeek, MiniMax, Xiaomi MiMo, Z.ai GLM, MoonshotAI Kimi) with zero middleman markup.
The gateway forwards every prompt to the model you (or your client) pick - no surprises, no hidden re-routing.
One OpenRouter key unlocks 100+ frontier models behind a single endpoint; one direct key per vendor unlocks the cheapest available rate.
Mix both worlds in the same http://127.0.0.1:8787/v1 gateway and the same dashboard.
The Copilot Chat picker natively carries the direct vendors only (DeepSeek, MiniMax, Xiaomi MiMo); OpenRouter, Gemini, Z.ai and MoonshotAI are gateway-only and reach Copilot Chat through Kilo Code or Continue, which sit on top of the same gateway.
If you opt in via aiflowbridge.gateway.languageRouting, polyglot projects can route Python to DeepSeek Flash, Rust to DeepSeek Pro, free-tier OpenRouter models to everything else, all from a single endpoint.
Pair-programming is built in: the dashboard shows sanitized prompt / response summaries of every recorded request, with one-click replay and a live Server-Sent Events stream so you see new requests land in real time.
Standalone gateway (no VS Code required, since 2.0.0)
The aiflowbridge-server CLI runs the gateway as a pure Node.js process: no VS Code, no extension host, ~30 MB RAM. Start it at boot with systemd / launchd / Task Scheduler, point Kilo Code, Continue, or the JetBrains AI Assistant custom endpoint at http://127.0.0.1:8787/v1, and the metrics stay consolidated across VS Code and the CLI. If both are running, the second one joins the first instead of starting a duplicate.
Three install paths:
A) AIFlowBridge: Install standalone gateway command in the VS Code extension - one click, platform-matched binary from GitHub Releases (~30 s).
B) Manual download of the prebuilt archive for your OS - extract and run.
C) Build from source - git clone + npm ci + npm run build:standalone.
Full setup, autostart templates, and client configs: docs/standalone.md.
Pick your cost point
One extension, flexible pricing tiers - choose what fits your workload.
The OpenRouter path trades a small upstream markup for access to 100+ frontier models (GPT-5.6, Claude Opus 4.8, Gemini 3.8 Flash, Llama 4 Maverick, Qwen 3.7 Max, etc.) behind a single API key.
The direct-vendor path squeezes the last cents out of token cost.
The local path is free forever.
| Stack |
Monthly cost (heavy use) |
| GitHub Copilot Pro |
$10 / month |
| Cursor Pro |
$20 / month |
| Kilo Code + OpenAI direct |
~$15-30 / month |
| Kilo Code + AIFlowBridge + Xiaomi MiMo (V2.5 / V2.6 suite) |
~$11 / month |
| Kilo Code + AIFlowBridge + Z.ai GLM 5.3 Flash |
~$17.50 / month |
| Kilo Code + AIFlowBridge + DeepSeek V4.1 Flash |
~$39 / month |
| Kilo Code + AIFlowBridge + MiniMax M3 |
~$39 / month |
| Kilo Code + AIFlowBridge + Google Gemini 3.8 Flash (BYOK) |
~$0-3 / month |
| Kilo Code + AIFlowBridge + OpenRouter free tier (15 models) |
$0 / month |
| Kilo Code + AIFlowBridge + Ollama local |
$0 / month |
For occasional use, the cheapest stacks (Gemini BYOK, MiMo, GLM Flash, Ollama, OpenRouter free tier) cut your AI bill by 40-100% vs Copilot.
The full breakdown lives in docs/cost.md.
AIFlowBridge itself is free, open-source, ad-free, tracker-free, no data collection.
You pay only the upstream providers you actually use - OpenRouter, Google AI Studio, DeepSeek, MiniMax, Xiaomi MiMo, Z.ai GLM, MoonshotAI Kimi, or your own local runtime.
Why AIFlowBridge?
- 100+ AI models behind one OpenRouter key. AIFlowBridge ships OpenRouter as a first-class upstream: GPT-5.6, Claude Opus 4.8, Gemini 3.8 Flash, Llama 4 Maverick, Mistral Large 2512, Qwen 3.7 Max, DeepSeek V4 Pro, plus every other model id at openrouter.ai/models - all routed through the same local gateway. 15 free-tier models are bundled (Nemotron 3 Ultra 550B, Gemma 4 31B multimodal, North Mini Code, Inkling, etc.) so they appear in
GET /v1/models with $0 dashboard pricing; the other 100+ ids are reachable verbatim by passing them in the model field or adding them to aiflowbridge.userModels. Compare to running bare OpenRouter: no telemetry, no cost dashboard, no Copilot Chat picker, no JetBrains client integration. See docs/providers.md
- Go direct when it's cheaper. The same gateway exposes direct DeepSeek (V4.1 Flash at $0.30/M in, V4 Pro), MiniMax (M2.7 -> M3, M3.1 Flash Preview, $0.30/M in), Xiaomi MiMo (V2.5, V2.6 Flash, V2.6 Pro at $0.10/M in), Z.ai (GLM 5.3, GLM 5.3 Flash at $0.15/M in, GLM 5.3 FlashX), and MoonshotAI (Kimi K3 2.8T MoE, Kimi K2.7 Code, Kimi K2.6) - no middleman markup on direct vendors, full control over your API keys. Mix OpenRouter, Gemini, and direct vendors in the same gateway catalog / dashboard - the cheapest model for boilerplate, the smartest for the hard stuff, all from the same client. In the Copilot Chat picker the direct vendors are listed natively (DeepSeek, MiniMax, Xiaomi MiMo); the gateway-only ones are added by Kilo Code or Continue. See docs/providers.md
- Google Gemini 3.8 / 3.7 / 3.6 Flash (BYOK). Access Google's 1M-token context frontier models with real-time streaming, multimodal vision (
inlineData), and reliable agentic tool calling (with automatic thought_signature propagation), over the public Gemini API with your own AIzaSy... key. This is the only supported Google route: the Google product OAuth route (Cloud Code Assist, sometimes labelled "Antigravity" in this project's history) was retired in this release and is now refused locally with google_product_oauth_unsupported. See docs/providers.md.
- Bulletproof Agentic Coding & Real-Time Streaming. Built specifically for autonomous coding agents (Kilo Code, Continue, Claude Dev). Emits OpenAI-shaped SSE chunks with sub-100ms time-to-first-token, merges consecutive turns seamlessly, and transparently preserves model thought signatures across function calls so complex agent loops never crash. See docs/gateway.md
- Smart model routing - opt-in, never surprise you. Out of the box, the gateway routes every request to the model you (or your client) pick in the model picker. If you opt in via
aiflowbridge.gateway.languageRouting ("python": "deepseek-flash", "rust": "deepseek-v4-pro", "*": "anthropic/claude-opus-4.8" - any model id works, OpenRouter or direct), the gateway auto-detects the project language and routes per request. Costs are visible at all times: every routing decision is logged, the dashboard Sessions panel groups requests into sessions by inactivity gap, and the Request details sub-table shows the per-request cost. See docs/gateway.md
- Workspace context - informational only. The detected context (languages, package managers, linters, formatters) is injected as a system message so the model knows your toolchain upfront. It never overrides the model picker - see docs/gateway.md
- Pair-programming visibility - the gateway captures sanitized prompt + response summaries on every request (Bearer /
sk-... / x-api-key redacted before storage). The dashboard's Shared session panel shows the last 20 Q&A pairs with one-click replay. Three loopback HTTP endpoints expose the same data for IDE integrations: GET /v1/sessions (list), GET /v1/replay/{id} (OpenAI-shaped body), GET /v1/events (live SSE stream) - see docs/gateway.md
- Cost control & Auth observability - per-request token counts, latency, real auth mode (
byok, oauth, plan, token), and estimated cost in a live dashboard (Ctrl+Alt+M). Sessions grouped automatically (inactivity gap configurable 1-60 min). Filter by provider, auth mode, date range, client (Kilo Code vs Continue vs curl), or source (gateway vs Copilot Chat). Paginated, with per-row delete. Telemetry export: two buttons (CSV and JSON) in the Filters panel download the currently filtered entries with a self-describing metadata header (generatedAt, extensionVersion, filters, totals). The bundled pricing snapshot is refreshed via AIFlowBridge: Refresh pricing now (or the dashboard's Refresh prices button) and stamped with source: ... on every Est. cost tooltip - see docs/dashboard.md
- Two ways to run it: as a VS Code extension or as a standalone Node.js binary - see docs/standalone.md
- Vision proxy - paste an image and a description is injected, for every model except
mimo-v2.5 which takes the image natively - see docs/vision-proxy.md
- Reasoning picker for MiniMax M3 (None/High/Max) and MiniMax M3.1 Flash Preview (5 depth levels from Low to Max, thinking always on) - see docs/reasoning.md
- Local-first: API keys in your OS keychain, telemetry on your machine, no remote endpoints
The full gallery (dashboard, pickers, providers, gateway, settings, metrics) lives in docs/screenshots.md, grouped by release version in descending order.
Features
- 100+ AI models through one OpenRouter key, plus six direct vendors for the cheapest path. GPT-5.6, Claude Opus 4.8, Gemini 3.8 Flash, Llama 4 Maverick, Mistral Large 2512, Qwen 3.7 Max, DeepSeek V4 Pro, Z.ai GLM 5.3, MoonshotAI Kimi K3 - all routed through the same
http://127.0.0.1:8787/v1 gateway. Of those six, three (DeepSeek, MiniMax, Xiaomi MiMo) also get an entry in the Copilot Chat picker. 11 direct-vendor models bundled for the Copilot Chat picker (DeepSeek V4.1 Flash / V4 Pro, MiniMax M2.7 / M3 / M3.1 Preview, Xiaomi MiMo V2.5 / V2.6 suite). 5 Gemini models via Google AI Studio API key (BYOK, pay-as-you-go on your GCP project) (Gemini 3.8 / 3.7 / 3.6 Flash, gemini-flash-latest, gemini-flash-lite-latest) with 1M context, native vision inlineData, and real-time streaming. 7 Z.ai and MoonshotAI gateway models (GLM 5.3, GLM 5.3 Flash / FlashX, Kimi K3, Kimi K2.7 Code / Highspeed, Kimi K2.6). 15 free-tier OpenRouter models bundled for GET /v1/models with $0 dashboard pricing (Nemotron 3 Ultra 550B, Gemma 4 31B multimodal, North Mini Code, Inkling, etc.). Every other OpenRouter model id is reachable verbatim by passing it in the model field - no AIFlowBridge update needed. See docs/providers.md
- Real-time streaming & agentic tool calling - instantaneous time-to-first-token streaming, full multi-turn role alternation, and bidirectional
thought_signature preservation for complex autonomous agent workflows in Kilo Code and Continue - see docs/gateway.md
- Workspace context injection - auto-detects your project's languages, package managers, linters, and formatters, and tells the model upfront on every request so completions are context-aware from the first token - see docs/gateway.md
- Language-based model routing - opt-in - off by default (
aiflowbridge.gateway.languageRouting = {}). When you set a non-empty map ("python": "deepseek-flash", "rust": "deepseek-v4-pro", "*": "MiniMax-M3" - any model id is accepted, including OpenRouter ones), the gateway picks the right model for each prompt automatically, or honours an explicit X-AIFlowBridge-Language header from the IDE. Disable the header override with aiflowbridge.gateway.allowLanguageHeaderOverride = false. Full defaults + cost-visibility notes in docs/gateway.md
- Pair-programming replay + live stream - the gateway captures sanitized summaries on every request;
GET /v1/sessions lists them, GET /v1/replay/{id} returns the full OpenAI-shaped body, GET /v1/events streams new requests over SSE in real time. The dashboard's Shared session panel surfaces the same data with one-click replay - see docs/gateway.md
- Metrics dashboard with sessions & auth telemetry - per-request token counts, latency, auth mode (
byok, oauth, plan, token), and estimated cost. Nine time presets, provider + auth mode + date-range + text filters, pagination, per-row delete. Requests are auto-grouped into sessions (inactivity gap configurable 1-60 min) so you see your daily workflow at a glance. Ctrl+Alt+M from anywhere - see docs/dashboard.md
- Built-in OpenAI-compatible gateway - port 8787, runs as a VS Code extension or a standalone CLI, singleton across processes. The gateway is the integration point for OpenRouter, Google Gemini, Kilo Code, Continue, JetBrains AI Assistant, Open WebUI, and any
curl - see docs/gateway.md and docs/standalone.md
- Zero-conf discovery -
GET /v1/discovery returns one-paste config snippets for Continue, Kilo Code, the OpenAI Python SDK, and curl. Optional UDP beacon broadcasts the gateway URL on the LAN (off by default) - see docs/gateway.md
- Transparent vision proxy - pasted images are described by another installed Copilot model. Zero configuration - see docs/vision-proxy.md
- Reasoning picker for MiniMax M3 (None/High/Max) and MiniMax M3.1 Flash Preview (5 depth levels from Low to Max, thinking always on) - see docs/reasoning.md
- Secure by default - API keys in VS Code's
SecretStorage (or env vars / secrets.json in standalone), never in settings.json. Credentials in stored summaries are redacted at extraction time. Telemetry is local, loopback-only. No remote endpoints
Quick start
1. Install
VS Code extension (Copilot Chat, Kilo Code inside VS Code):
Standalone gateway (JetBrains, Kilo Code outside VS Code, Open WebUI, curl, autostart at boot):
git clone https://github.com/LaurentOngaro/aiflowbridge
cd aiflowbridge
npm ci
npm run build:standalone
node dist/standalone/main.js # gateway is live on http://127.0.0.1:8787/v1
Full setup including autostart systemd / launchd / Task Scheduler templates: docs/standalone.md.
2. Set your API keys
Start with one OpenRouter key to unlock 100+ models - that's usually enough for most setups.
Add direct vendor keys later if you want to bypass the OpenRouter markup for heavy workloads on Google Gemini / DeepSeek / MiniMax / Xiaomi MiMo / Z.ai / MoonshotAI.
VS Code extension (keys go to your OS keychain):
AIFlowBridge: Add a custom model # prompts for OpenRouter first (100+ models)
AIFlowBridge: Edit model registry # or paste the OpenRouter entry directly
For direct vendors (cheapest at high volume):
Ctrl+Shift+P -> Google AI Studio: Set API Key (BYOK pay-as-you-go) # VS Code: paste an AIzaSy... key
Ctrl+Shift+P -> DeepSeek: Set API Key
Ctrl+Shift+P -> MiniMax: Set API Key
Ctrl+Shift+P -> Xiaomi MiMo: Set API Key
Ctrl+Shift+P -> Z.ai GLM: Set API Key
Ctrl+Shift+P -> MoonshotAI Kimi: Set API Key
Google AI Studio (BYOK, pay-as-you-go on your GCP project):
Ctrl+Shift+P -> Google AI Studio: Set API Key (BYOK pay-as-you-go) # VS Code: paste an AIzaSy... key
aiflowbridge-server auth googleaistudio setApiKey <AIzaSy...> # standalone equivalent
aiflowbridge-server auth googleaistudio clearApiKey # revoke locally stored key
Create your key at https://aistudio.google.com/apikey.
This route is independent of any AI Studio Pro subscription (it consumes the GCP project's pay-as-you-go counter).
It is the only supported Google route.
The Google product OAuth route (Antigravity / Cloud Code Assist) has been retired.
This OAuth transport was implemented in v2.17.0 to explore consumer quota access, but has now been completely removed because accessing internal Antigravity or Code Assist endpoints via third-party tools or OAuth extraction is an explicit violation of Google's Terms of Service and the official Google Antigravity FAQ, risking account suspension or termination.
Google officially requires third-party coding agents and tools to use an API key (Google AI Studio or Vertex AI) instead.
Furthermore, Google shut down consumer-tier Code Assist requests for Pro/Ultra accounts on 2026-06-18, and no supported route exists to consume consumer subscription quotas via third-party gateways.
AIFlowBridge therefore refuses any configuration still pointing at cloudcode-pa.googleapis.com, locally and before any upstream request, with HTTP 503 and the code google_product_oauth_unsupported.
Nothing is sent, no browser opens, and there is no automatic fallback to the API-key route - that is a separate action because it changes what you are billed for.
Ctrl+Shift+P -> AIFlowBridge: Migrate Google AI Studio off the retired OAuth route to the Gemini API # explicit migration, names the billing consequence
aiflowbridge-server auth googleaistudio --logout # delete the local credentials left by the old route
Creating or linking a GCP project is not a supported remedy for the retired route.
Details and sources: providers.md.
Skip this section entirely if you only need the API-key route - it covers the same model ids with the always-available public API and your own key.
Gemini upstream frames stream to the client in real time by default; on lossy links set aiflowbridge.gateway.bufferGeminiStream to true for the buffered drain-then-replay fallback - see docs/gateway.md.
Then point any OpenAI-compatible client at http://127.0.0.1:8787/v1 with model: "gemini-3.8-flash" (or "gemini-3.7-flash" / "gemini-3.6-flash").
Standalone (env vars first, then <storageDir>/secrets.json chmod 600):
export AIFLOWBRIDGE_OPENROUTER_API_KEY=sk-or-v1-... # 100+ models behind this one key
export AIFLOWBRIDGE_GOOGLEAISTUDIO_API_KEY=AIzaSy... # Gemini 3.8/3.7/3.6 Flash BYOK
export AIFLOWBRIDGE_DEEPSEEK_API_KEY=sk-...
export AIFLOWBRIDGE_MINIMAX_API_KEY=...
export AIFLOWBRIDGE_XIAOMI_API_KEY=...
export AIFLOWBRIDGE_ZAI_API_KEY=... # GLM 5.3 / 5.3 Flash / 5.3 FlashX
export AIFLOWBRIDGE_MOONSHOT_API_KEY=... # Kimi K3 / K2.7 Code / K2.6
Each variable also answers to its bare vendor name (OPENROUTER_API_KEY, GOOGLEAISTUDIO_API_KEY, DEEPSEEK_API_KEY, MINIMAX_API_KEY, XIAOMI_API_KEY, ZAI_API_KEY, MOONSHOT_API_KEY) as a fallback, so an environment that already exports them under those names works without renaming.
The prefixed name wins when both are set.
The bare name is discovered by scanning the environment, so a vendor added in a later release is picked up the same way with nothing to configure.
3. Use it
Copilot Chat (VS Code): open Copilot Chat (Ctrl+Shift+I), pick a model in the chat header (DeepSeek V4.1 Flash / V4 Pro, MiniMax M2.7 -> M3 / M3.1 Preview, Xiaomi MiMo V2.5 / V2.6 Flash / V2.6 Pro).
Gemini, Z.ai, MoonshotAI, and OpenRouter models reach Copilot Chat via Kilo Code or Continue, not the Copilot picker.
Any OpenAI-compatible client (gateway), 100+ models via OpenRouter or direct:
curl http://127.0.0.1:8787/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model": "glm-5.3", "messages": [{"role": "user", "content": "ping"}]}'
Swap the model field for any id at openrouter.ai/models or direct vendors (deepseek-flash, deepseek-v4-pro, MiniMax-M3, mimo-v2.6-flash, glm-5.3, kimi-k3, gemini-3.8-flash, etc.) - the gateway forwards verbatim.
See docs/providers.md for the full list.
Kilo Code inside VS Code: (same gateway, chat-style client - no terminal needed)
- Install Kilo Code (or the Open VSX build for Cursor / Windsurf / VSCodium).
- Make sure the gateway is running:
AIFlowBridge: Show logs should show [AIFlowBridge] Gateway started successfully on http://127.0.0.1:8787.
- If it is not, run
AIFlowBridge: Start gateway (VS Code extension) or npm run start:standalone (standalone CLI).
- Open the Kilo Code side panel, click the gear icon (Settings), then Providers -> API Provider -> OpenAI Compatible.
- Fill in:
| Field |
Value |
| Base URL |
http://127.0.0.1:8787/v1 |
| API Key |
any non-empty string (e.g. sk-aiflowbridge-local) |
| Model |
gemini-3.8-flash (or openai/gpt-5.6-sol / any id from openrouter.ai/models) |
| Streaming |
Enabled |
- Hit Save, then send a prompt in the Kilo Code chat box.
The same Base URL works whether the gateway runs as the VS Code extension or as the standalone CLI (docs/standalone.md).
The only difference between the two setups is which process owns port 8787.
Direct vendors work the same way: gemini-3.8-flash, MiniMax-M3, deepseek-v4-pro, mimo-v2.5, etc.
For Continue, JetBrains AI Assistant, Open WebUI, or any OpenAI SDK, point the client at http://127.0.0.1:8787/v1 with any non-empty apiKey (the gateway validates credentials upstream, not in the local header).
Ready-to-paste client configs: docs/standalone.md.
Full Kilo Code reference: docs/kilo-code.md.
Gateway-only vendors
Some vendors are reachable only through http://127.0.0.1:8787/v1, never through the Copilot Chat picker.
That is a deliberate split: a picker entry requires a dedicated vscode.LanguageModelChatProvider class, and for a meta-provider or a gateway-only upstream that class buys nothing over forwarding the call verbatim.
The catalogue as of 2.24.0:
| Vendor |
Models |
Context |
Vision |
In / Out per M (USD) |
| OpenRouter |
100+ ids verbatim; 15 free-tier ids bundled |
varies |
varies |
$0 for the bundled free tier |
| Google AI Studio |
Gemini 3.8 / 3.7 / 3.6 Flash, gemini-flash-latest, gemini-flash-lite-latest |
1M |
native |
0.30 / 2.50 |
| Z.ai |
GLM 5.3, GLM 5.3 Flash, GLM 5.3 FlashX |
1M, 128K out |
GLM 5.3 text-only, Flash / FlashX native |
1.40 / 4.40, 0.15 / 0.50, 0.37 / 1.25 |
| MoonshotAI |
Kimi K3, Kimi K2.7 Code, Kimi K2.7 Code Highspeed, Kimi K2.6 |
1M (K3) and 256K, native |
native (K3 reads image and video) |
3.00 / 15.00 (K3), 0.95 / 4.00 (K2.7), 1.90 / 8.00 (Highspeed), 0.95 / 4.00 (K2.6) |
curl http://127.0.0.1:8787/v1/chat/completions \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer sk-aiflowbridge-local" \
-d '{"model": "glm-5.3-flash", "messages": [{"role": "user", "content": "ping"}]}'
Things the upstream will reject, so you do not have to discover them the hard way:
- GLM 5.3 and Kimi K3 always reason. There is no non-thinking mode. Sending
thinking.type: disabled errors out; use the top-level reasoning_effort field with low, high, or max (default max) instead.
- Kimi K2.7 Code fixes its sampling parameters.
temperature 1.0, top_p 0.95, n 1 and both penalties 0 are hard-coded upstream: any other value is an error. Its tool_choice accepts auto or none only. Kimi K2.6 is the one current MoonshotAI model where thinking can be turned off.
- Kimi K3 vision needs base64 or an uploaded
ms:// file. Public image URLs are not supported. It also requires a top-up of at least $1 before the model unlocks.
- GLM Coding Plan keys need a different base URL. Set
aiflowbridge.providers.zai.baseUrl to https://api.z.ai/api/coding/paas/v4; the bundled default https://api.z.ai/api/paas/v4 is the pay-as-you-go endpoint.
- MiniMax M3.1 Flash Preview is gated. Upstream serves it through M Plan and MiniMax Code only, so a legacy Token Plan key gets a 403. No pay-as-you-go rate is published, which is why the bundled entry carries no
pricing block.
A vendor that is not in the bundled registry still works: add it through AIFlowBridge: Add a custom model, or declare it in aiflowbridge.userModels with the matching family.
Anything with family: "openrouter" is reachable immediately, with no recompile.
4. Add a custom OpenRouter model (the part that bites if you forget it)
You added a model in aiflowbridge.userModels with family: "openrouter", restarted VS Code, ran a prompt - and got a 401 from the gateway: {"error":{"message":"No cookie auth credentials found","code":401}}.
That is not a Kilo Code / Continue / curl problem. It means the gateway reached OpenRouter without an Authorization: Bearer ... header, so OpenRouter answered "no credentials".
AIFlowBridge never asks you for the OpenRouter key during AIFlowBridge: Add a custom model on purpose (OpenRouter is Path B - gateway only, no per-vendor picker entry).
You have to give it the key yourself, through one of the three channels below. Pick whichever fits your setup.
Step A - provide your OpenRouter key once.
| Channel |
Where |
When to use |
| Env var (recommended for fastest fix) |
$env:AIFLOWBRIDGE_OPENROUTER_API_KEY = "sk-or-v1-..." |
You just want it to work, you do not want to touch any file. |
| File (works on VS Code and standalone) |
<globalStorageUri>/secrets.json (chmod 600) |
You prefer files over env vars, or you share a setup. |
| VS Code SecretStorage / OS keychain |
aiflowbridge.providers.openrouter.apiKey |
You are already managing keys through another extension. |
Env var (PowerShell, current user, persists across reboots):
[Environment]::SetEnvironmentVariable("AIFLOWBRIDGE_OPENROUTER_API_KEY", "sk-or-v1-...", "User")
# Close VS Code, reopen it so the new env var is inherited, then run AIFlowBridge: Show logs to confirm.
File (VS Code globalStorageUri is your OS user data folder, e.g. %APPDATA%\Code\User\globalStorage\LaurentOngaro.aiflowbridge):
# PowerShell equivalent:
ni "$env:APPDATA\Code\User\globalStorage\LaurentOngaro.aiflowbridge\secrets.json" -Force | Out-Null
@'
{
"aiflowbridge.providers.openrouter.apiKey": "sk-or-v1-..."
}
'@ | Set-Content -Encoding utf8 "$env:APPDATA\Code\User\globalStorage\LaurentOngaro.aiflowbridge\secrets.json"
# On Windows the ACL is set by your user; on Linux/macOS run: chmod 600 <path>/secrets.json
Reload the VS Code window (Developer: Reload Window) after writing the file - the secret is picked up at activation.
Step B - declare the model. Three equivalent recipes below, pick the one that matches your client.
B1. From VS Code itself (Command Palette):
Ctrl+Shift+P -> AIFlowBridge: Add a custom model -> pick OpenRouter.
- The picker fetches
https://openrouter.ai/api/v1/models and lists every id - including dated variants like deepseek/deepseek-v4-pro-0813, deepseek/deepseek-v4-flash-0731, and any future model.
- Pick the id, answer the three capability questions (tool calling / vision / thinking).
- Confirm
Add. AIFlowBridge writes the entry to aiflowbridge.userModels and tells you to reload the window.
- Reload -> the new id is visible in
GET /v1/models (the gateway synthesizes the profile from vendors.openrouter.baseUrl).
B2. From VS Code with the Kilo Code extension (recommended for chat-style use):
- Install Kilo Code (or the open VSX build for Cursor / Windsurf / VSCodium).
- Make sure AIFlowBridge is running (
AIFlowBridge: Show logs should show [AIFlowBridge] Gateway started successfully on http://127.0.0.1:8787).
- Open the Kilo Code panel, click the gear icon (Settings), then API Providers -> OpenAI Compatible.
- Fill in:
- Base URL:
http://127.0.0.1:8787/v1
- API Key: any non-empty placeholder (e.g.
sk-aiflowbridge-local) - the gateway forwards the real key upstream.
- Model:
deepseek/deepseek-v4-pro-0813 (or any other id from https://openrouter.ai/models).
- Hit Save, then send a prompt. Kilo Code calls the gateway, which forwards to OpenRouter with the key from Step A.
B3. From any terminal with curl (no IDE involved, useful for scripts and CI):
curl http://127.0.0.1:8787/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model": "deepseek/deepseek-v4-pro-0813", "messages": [{"role": "user", "content": "ping"}]}'
Same shape for any OpenRouter id - just swap the model field.
Troubleshooting the 401 in three checks:
AIFlowBridge: Show logs -> open the provider summary printed at activation (prefix [AIFlowBridge]) and look for the openrouter line saying apiKey=<none>. That confirms the resolver did not find the key.
- The error is
No cookie auth credentials found (not Invalid API key) -> the gateway reached OpenRouter but with no Authorization header. Add the env var / file as in Step A.
- The error is
Invalid API key -> the key was found but is wrong or revoked. Re-grab it from openrouter.ai/settings/keys.
Full reference: docs/providers.md.
Documentation
| Page |
Topic |
| docs/standalone.md |
Install, configure, autostart, client setup for the standalone CLI |
| docs/kilo-code.md |
Kilo Code setup (Cursor / Windsurf / VSCodium / code-server) |
| docs/jetbrains-continue.md |
Continue on JetBrains (Free / Pro) |
| docs/jetbrains-ai-assistant.md |
JetBrains AI Assistant custom OpenAI endpoint |
| docs/cost.md |
Real cost breakdown, indicative rates, vision savings |
| docs/providers.md |
Provider table, capabilities, adding a custom model |
| docs/vision-proxy.md |
How the transparent image proxy works |
| docs/reasoning.md |
MiniMax thinking effort selector (M3 on/off, M3.1 depth levels) |
| docs/gateway.md |
Local OpenAI-compatible gateway, version handling |
| docs/dashboard.md |
Metrics dashboard features, filters, pagination |
| docs/screenshots.md |
Visual gallery across release versions |
| docs/architecture.md |
Source layout, model registry 3-tier merge |
| docs/development.md |
Build, test, package, privacy & security |
| docs/troubleshooting.md |
Common errors and fixes |
Commands
| Command |
Description |
AIFlowBridge: Add a custom model |
Declare a new model from any /v1/models endpoint (OpenRouter is the default pick and unlocks 100+ ids) |
AIFlowBridge: Edit model registry |
Open per-user registry override in the editor (paste the vendors.openrouter block) |
AIFlowBridge: Reset model registry to bundled defaults |
Revert to bundled catalog |
AIFlowBridge: Configure Kilo Code reasoning levels |
Write the registry-declared reasoning levels into your Kilo Code configuration (also offered once per window on activation) |
AIFlowBridge: Show metrics dashboard |
Open metrics dashboard (Ctrl+Alt+M) |
AIFlowBridge: Refresh metrics |
Reload the telemetry snapshot from disk and refresh the UI |
AIFlowBridge: Reset metrics |
Clear cumulative counters and disk (modal confirmation) |
AIFlowBridge: Purge session log |
Clear only the captured prompt / response summaries (totals kept) |
AIFlowBridge: Refresh pricing now |
Hit OpenRouter /v1/models, write <globalStorageUri>/pricing-override.json, hot-update the in-memory pricing registry |
AIFlowBridge: Open pricing data |
Open the bundled resources/pricing.json in the editor |
AIFlowBridge: Start gateway |
Start proxy |
AIFlowBridge: Restart gateway here (debug) |
Restart the gateway in the window that owns it (debug loop) |
AIFlowBridge: Stop local gateway |
Stop proxy |
AIFlowBridge: Copy gateway URL |
Copy URL to clipboard |
AIFlowBridge: Join external (standalone) gateway |
Switch to a running standalone gateway |
AIFlowBridge: Set vision proxy model |
Choose vision model |
AIFlowBridge: Open settings |
Open the AIFlowBridge settings page |
AIFlowBridge: Show logs |
Open output log |
AIFlowBridge: Open request dumps folder |
Reveal the folder with request dumps for diagnosis |
AIFlowBridge: Install standalone gateway |
Download + extract the standalone CLI for the current OS |
Google AI Studio: Set API Key (BYOK pay-as-you-go) |
Configure Google Gemini API key (AIzaSy...) for pay-as-you-go GCP billing |
Google AI Studio: Clear API Key |
Revoke locally stored Google Gemini API key |
AIFlowBridge: Delete local Google product OAuth credentials (local cleanup only, not a remote revocation) |
Delete the local credentials left by the retired route |
AIFlowBridge: Migrate Google AI Studio off the retired OAuth route to the Gemini API (may incur charges) |
Point a legacy configuration at the Gemini API, after an explicit confirmation naming the billing consequence |
DeepSeek: Set API Key / Clear API Key |
Manage DeepSeek credentials (direct vendor) |
MiniMax: Set API Key / Clear API Key |
Manage MiniMax credentials (direct vendor) |
Xiaomi MiMo: Set API Key / Clear API Key |
Manage Xiaomi MiMo credentials (direct vendor) |
Z.ai GLM: Set API Key / Clear API Key |
Manage Z.ai GLM credentials (gateway-only vendor) |
MoonshotAI Kimi: Set API Key / Clear API Key |
Manage MoonshotAI Kimi credentials (gateway-only vendor) |
Note: OpenRouter has no per-vendor Set API Key / Clear API Key commands by design - it is exposed through the gateway path only (works from Kilo Code, Continue, Open WebUI, curl).
Z.ai and MoonshotAI are gateway-only too, but they do ship the Set API Key / Clear API Key pair: without it there would be no UI entry point at all for a vendor that has no provider class.
Store the key via the AIFLOWBRIDGE_OPENROUTER_API_KEY env var (PowerShell: [Environment]::SetEnvironmentVariable("AIFLOWBRIDGE_OPENROUTER_API_KEY", "sk-or-v1-...", "User")) or via <globalStorageUri>/secrets.json.
Full procedure (including the 401 fix and a copy-paste Kilo Code config): see step 4 above.
- Alibaba Qwen (DashScope) as a first-class vendor - dedicated picker entry, per-vendor
setApiKey / clearApiKey, gateway profile, bundled flagship models (Qwen3 Coder / Qwen3 Max). Z.ai GLM and MoonshotAI Kimi are done as of 2.19.0 (gateway-only, GLM 5.3 / 5.3 Flash / 5.3 FlashX and Kimi K3 / K2.7 Code / K2.6 bundled).
- Ollama local upstream - the next "single-key unlocks N models" milestone, on par with OpenRouter in terms of breadth per key
- web-based dashboard at
http://127.0.0.1:8787/dashboard
- auto-routing with failover across providers - ordered fallback list so an outage on one upstream does not block the agent
- ...
Released in 2.24.0: Google AI Studio is BYOK only - the Google product OAuth transport (Antigravity / Cloud Code Assist) removed from the product, a stale OAuth profile refused locally with google_product_oauth_unsupported before any upstream call, two cleanup commands (delete the local legacy credentials, migrate a legacy base URL to the Gemini API), and quota classification restricted to positive evidence.
See CHANGELOG.md.
Released in 2.19.0: Model Catalog Refresh & Gateway Expansion (Z.ai & MoonshotAI) - 38 bundled models, direct gateway support for Z.ai GLM 5.3 and MoonshotAI Kimi K3 families, DeepSeek V4.1 Flash, MiniMax M3.1 Flash Preview, Xiaomi MiMo V2.6 suite, Gemini rolling aliases, and 15 refreshed OpenRouter free-tier models.
See CHANGELOG.md.
Released in 2.18.x: Gemini Agentic Power & Auth Observability - Real-time streaming for Gemini 3.8/3.7/3.6 Flash, bidirectional thought_signature preservation for agent tool calls (plus the opt-in injectThoughtSignature server-side cache for clients that drop the signature), native vision inlineData, multi-turn alternation, and real auth mode tracking (byok / oauth / plan / token) with dashboard pills, filters, and CSV/JSON exports.
See CHANGELOG.md.
Released in 2.17.0: Google AI Studio & Antigravity (Gemini) - Dual-route architecture introducing Gemini 3.8 / 3.7 / 3.6 Flash via direct BYOK (AIzaSy...) or 1-click Google Cloud Code Assist OAuth, plus plan vs token billing detection.
See CHANGELOG.md.
Earlier in 2.16.x: Unified API key resolution across standalone CLI and VS Code extension, streamlined OpenRouter onboarding.
See CHANGELOG.md.
Back in 2.15.0: Dynamic pricing and cost estimation - bundled resources/pricing.json (OpenRouter catalog snapshot, refreshed per release and on demand) + dashboard Refresh prices button + AIFlowBridge: Refresh pricing now + dashboard CSV / JSON export of the filtered telemetry.
See CHANGELOG.md.
Full roadmap: TODO.md.
AIFlowBridge is free, open-source, ad-free, tracker-free. It will never ask you to pay for a feature, show you ads, or phone home.
Sponsorship funds the whole body of work, not just this extension.
License
MIT
| |