Extend GitHub Copilot Chat with the AI providers you choose.
Xiaomi MiMo ยท Z.ai GLM ยท Groq ยท NVIDIA NIM ยท OmniRoute โ all first-class, equal siblings inside the VS Code Language Model API.
Install ยท Quick Start ยท Configuration ยท Contributing
GitHub Copilot Chat is great โ but you're limited to GitHub's model catalog. Copilot Amplify opens it up:
| ๐ Bring your own provider | Xiaomi MiMo, Z.ai GLM, Groq, NVIDIA NIM, and OmniRoute work out of the box |
| โ๏ธ No privileged provider | Every provider is an equal sibling โ no hidden routing, no forced hierarchy |
| ๐ Secrets done right | API keys live in VS Code SecretStorage (OS keychain), never in settings.json or logs |
| ๐ง Full AI capability surface | Streaming, tool calling, reasoning/thinking output, vision input, system prompts |
| ๐ก๏ธ Production-grade reliability | Retries with Retry-After, per-provider circuit breakers, timeouts everywhere, saturation-aware errors |
| ๐ Live model catalogs | OmniRoute discovers models from your server at runtime โ new models appear without updating the extension |
| ๐๏ธ Observable | Unified diagnostics, per-request telemetry logs, live health states in the tree view |
OmniRoute is a provider, not a middleman. Its internal multi-provider routing lives entirely on the OmniRoute server; this extension only ever talks to your configured base URL โ exactly like any other vendor endpoint.
- Installation
- Quick Start
- Supported Providers
- Architecture
- Configuration
- Commands
- Reliability
- Security
- Troubleshooting
- Development
- Contributing
- Documentation
- License
Option A โ from a marketplace (recommended)
Available on both major registries:
| Registry | Install |
|---|---|
| VS Code Marketplace | Install for VS Code โ click Install, or inside VS Code: Extensions โ Search "Copilot Amplify" |
| Open VSX | Install for VSCodium / Gitpod / Cursor & friends โ or CLI: open-vsx compatible editors via code --install-extension mojahid2021.copilot-amplify |
Or straight from the terminal:
# VS Code / Cursor / Windsurf
code --install-extension mojahid2021.copilot-amplifyOption B โ build from source
git clone https://github.com/mojahid2021/copilot-amplify.git
cd copilot-amplify
npm install
npm run compileThen press F5 in VS Code to launch an Extension Development Host.
Option C โ packaged VSIX
npm install && npm run package # โ copilot-amplify-<version>.vsixInstall via Extensions: Install from VSIXโฆ.
Requires VS Code โฅ 1.125 and an active GitHub Copilot subscription (the extension extends Copilot Chat's Language Model API).
- Open the panel โ click the Copilot Amplify icon in the activity bar.
- Add a key โ click the ๐ icon on any provider row and paste your API key. It goes straight into your OS keychain.
- Pick a model โ open Copilot Chat's model picker and choose e.g. Z.ai ยท Glm 5.2.
- Chat. That's it.
No settings.json edits required. Full walkthrough with copy-paste recipes:
docs/usage-examples.md
| Provider | Catalog | Highlights |
|---|---|---|
| Xiaomi MiMo | Static (2 models) | Auto-routes token-plan (tp-) keys to the dedicated gateway; up to 1M-token context |
| Z.ai GLM | Static (10 models) | Reasoning-effort control on GLM-5.x; vision on glm-5v-turbo |
| Groq | Static (7 models) | Ultra-fast Llama & GPT-OSS serving |
| NVIDIA NIM | Static (17 models) | Broad open-model catalog with transparent ID mapping |
| OmniRoute | ๐ Dynamic | Discovers models live from GET /models; custom chat endpoints supported; anonymous local operation |
Capabilities shown in the picker are truthful by design โ a model is only advertised with vision/tools/reasoning if it actually supports them.
VS Code
โ
โผ
VS Code Language Model API
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Copilot Amplify Core โ
โ โ
โ Provider Registry Model Catalogs โ
โ Authentication HTTP Transport โ
โ Streaming / SSE Retry / Timeout โ
โ Circuit Breaker Error Taxonomy โ
โ Context / Converter Thinking / Tools โ
โ Logging / Redaction Diagnostics โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ
Provider Registry
โ
โโโโโโโโโโฌโโโโโโโโโผโโโโโโโโโฌโโโโโโโโโโโโ
โผ โผ โผ โผ โผ
Xiaomi Z.ai Groq NVIDIA OmniRoute
Provider Provider Provider Provider Provider
โ โ โ โ โ
โผ โผ โผ โผ โผ
MiMo API Z.ai API Groq API NVIDIA NIM OmniRoute Server
โ
โโโโโโโโโโโโโผโโโโโโโโโโโโ
โผ โผ โผ
Provider A Provider B Provider C
Adding a provider means adding one descriptor module + tests โ no core changes. See docs/adding-a-provider.md for the full guide.
Project layout
src/
โโโ core/
โ โโโ api/ # GenericApiClient (OpenAI SDK), shared SSE parser
โ โโโ auth/ # SecretStorage-backed BaseAuthManager
โ โโโ context/ # LMโwire converters, token estimation & truncation
โ โโโ errors/ # Normalized error taxonomy + HTTP mapping
โ โโโ logging/ # OutputChannel logger with secret redaction
โ โโโ models/ # Static model catalogs per fixed-catalog provider
โ โโโ provider/ # BaseChatProvider + ProviderRegistry
โ โโโ resilience/ # TTLCache (coalescing), CircuitBreaker, saturation classifier
โ โโโ retry/ # Backoff, jitter, Retry-After, cancellation
โ โโโ thinking/ # <think>/<thought> stream extraction
โ โโโ diagnostics.ts # Unified credential-free report across providers
โ โโโ url.ts # Base URL validation / normalization / joining
โโโ providers/
โ โโโ xiaomi/ zai/ groq/ nvidia/ # Fixed-catalog descriptors
โ โโโ omniroute/ # Full dynamic provider module
โ โโโ index.ts # Registry assembly
โโโ commands/ # Command registrations
โโโ ui/ # Providers & Models tree view
โโโ extension.ts # Activation (lightweight, zero network I/O)
โโโ secretsMigration.ts # One-time plaintextโSecretStorage migration
tests/
โโโ mocks/vscode.ts # Minimal vscode API mock for unit tests
โโโ helpers/sse.ts # SSE stream builders
โโโ unit/ # 21 files, 220+ cases incl. cross-provider contract tests
Set keys through the UI โ never edit settings files:
- Tree view โ ๐ icon on a provider row, or
Copilot Amplify: Manage Providersโฆ โ Set API Key
Keys are stored via vscode.SecretStorage
(OS keychain-backed) and never appear in logs, diagnostics, or errors.
Upgrading from 1.x? Plaintext settings entries are migrated automatically on
first activation and then removed.
๐ก OmniRoute anonymous mode: no key needed for local servers โ they work out of the box.
| Setting | Default | Purpose |
|---|---|---|
copilot-amplify.enableReasoning |
true |
Global reasoning toggle for thinking-capable models |
copilot-amplify.customSystemPrompt |
(empty) | Injected into every request across providers |
copilot-amplify.requestTimeoutMs |
120000 |
Chat request timeout for fixed-catalog providers |
copilot-amplify.debugLogging |
false |
Debug-level logs in the output channel |
copilot-amplify.circuitBreaker.enabled |
true |
Fail-fast after repeated failures โ every provider |
copilot-amplify.circuitBreaker.failureThreshold |
5 |
Consecutive failures before a circuit opens |
copilot-amplify.circuitBreaker.resetTimeoutSeconds |
30 |
Cooldown before a half-open probe |
| Setting | Default | Purpose |
|---|---|---|
copilot-amplify.omniroute.baseUrl |
http://localhost:20128/v1 |
Server base URL (validated + normalized) |
copilot-amplify.omniroute.chatEndpoint |
(empty) | Custom chat-completions route โ absolute URL or path relative to Base URL |
copilot-amplify.omniroute.noCache |
false |
Bypass the server-side semantic cache |
copilot-amplify.omniroute.noMemory |
true |
Skip server-side memory/skills injection |
copilot-amplify.omniroute.compression |
(empty) | Compression override (off, default, engine:<id>) |
copilot-amplify.omniroute.sessionId |
(empty) | Explicit session tag for cost attribution/memory |
copilot-amplify.omniroute.progress |
false |
Opt into server progress events |
copilot-amplify.omniroute.modelCacheTtlSeconds |
300 |
Model discovery cache TTL |
copilot-amplify.omniroute.requestTimeoutMs |
120000 |
Chat request timeout |
copilot-amplify.omniroute.discoveryTimeoutMs |
8000 |
Discovery / connection-test timeout |
copilot-amplify.omniroute.warmupOnStartup |
false |
Discover models at activation instead of first use |
copilot-amplify.omniroute.logTelemetry |
true |
Log routing/cost telemetry per request |
Base URLs are normalized โ these are all equivalent, no //v1 accidents:
https://example.com https://example.com/
https://example.com/v1 https://example.com/v1/
General
| Command | Description |
|---|---|
Copilot Amplify: Manage Providersโฆ |
QuickPick hub: keys, tests, refresh, diagnostics |
Copilot Amplify: Refresh Providers & Models |
Invalidate caches + re-discover |
Copilot Amplify: Show Diagnostics |
Credential-free report for all providers |
Copilot Amplify: Set / Clear API Key |
Credential management (context-aware in the tree) |
Copilot Amplify: Test Connection |
Lightweight reachability + auth probe |
Copilot Amplify: Pin / Unpin / Select Model |
Favorites and active model |
OmniRoute-specific
| Command | Description |
|---|---|
OmniRoute: Configureโฆ |
Guided: base URL โ chat endpoint โ optional key โ test |
OmniRoute: Edit Chat Endpoint |
Quick custom-endpoint override (also in the tree ACTIONS panel) |
OmniRoute: Set / Remove API Key |
SecretStorage credential management |
OmniRoute: Test Connection |
Latency + chat-model count report |
OmniRoute: Refresh Models |
Force re-discovery of /models |
OmniRoute: Show Diagnostics |
Full configuration & health report |
OmniRoute: Reset Configuration |
Restore defaults + clear stored key |
Show Omniroute Telemetry |
Open the per-request telemetry log channel |
- Retries โ exponential backoff with full jitter on
408/429/5xxand network errors; honorsRetry-Afteron every transport path; never retries400/401/403/404, cancellations, or open circuits. - Circuit breaker โ per-provider, settings-driven; open circuits reject instantly instead of burning backoff time; automatic half-open recovery probe.
- Timeouts โ separate request/discovery budgets; nothing hangs indefinitely.
- Saturation awareness โ
503/529bodies are inspected to distinguish queue saturation from maintenance; errors tell you which and what it means. - Live health โ
connectedยทnot-configuredยทerrorยทrate-limitedยทauth-failed, reflected in the tree in real time. - Streaming โ hardened SSE parser: fragmented chunks, multi-event frames, CRLF, comments,
[DONE], malformed-frame tolerance, trailing flushes. Reasoning deltas stream as native thinking parts. - Cancellation โ every request wires VS Code tokens into abort signals; cancelled streams release resources immediately.
- ๐ Credentials only in SecretStorage; legacy plaintext settings migrated away automatically and never logged.
- ๐ Central logger redacts
Authorizationheaders, bearer tokens, and sensitive keys; diagnostics expose only a boolean configured flag. - ๐ Base URLs validated before any network call: http/https only, embedded credentials rejected (SSRF guard).
- ๐งฐ Tool-call arguments parsed with prototype-pollution-safe JSON.
- ๐ Telemetry logging uses a strict header allowlist โ nothing arbitrary is dumped.
| Symptom | Fix |
|---|---|
| "Authentication failed (401)" | Re-set the key (tree ๐). Keys are never deleted automatically. 403 usually means region/access restrictions. |
| OmniRoute shows no models | Run OmniRoute: Test Connection. Check diagnostics for the last discovery error; missing /v1 in the Base URL is the usual culprit. |
| "circuit open" errors | The breaker tripped after repeated failures. Wait out the cooldown or lower failureThreshold; disable entirely via circuitBreaker.enabled. |
| New server model not in picker | Refresh Providers & Models. Non-chat entries (embeddings/rerank/TTS) are filtered by design. |
| Requests feel stuck | Lower requestTimeoutMs / omniroute.requestTimeoutMs; enable debugLogging and check the output channel. |
More walkthroughs: docs/usage-examples.md ยง8.
npm install
npm run compile # tsc build โ out/
npm run watch # incremental build
npm run lint # eslint (src + tests, typed)
npm run typecheck # tsc --noEmit (strict + noUncheckedIndexedAccess)
npm test # vitest โ 223 tests, fully mocked, no real keys needed
npm run package # vsce โ .vsixThe test suite covers URL normalization, SSE robustness, retry semantics, circuit-breaker transitions, cache coalescing, error taxonomy, secret redaction, tool-call parsing, context-truncation integrity, OmniRoute discovery/filtering, connection testing, session handling, telemetry normalization, secrets migration, and a cross-provider contract suite.
Releases go to both registries:
npm run package # build copilot-amplify-<version>.vsix
# VS Code Marketplace (publisher: mojahid2021)
npx vsce publish
# Open VSX (VSCodium, Gitpod, and other VS Code forks)
npx ovsx publish --pat <OPEN_VSX_PAT>Contributions are welcome! Good first steps:
- ๐ Read docs/adding-a-provider.md โ adding a provider requires exactly one descriptor module, registration wiring, and tests. No core changes.
- ๐ Check open issues or file a bug with reproduction steps.
- โ
Before opening a PR:
npm run typecheck && npm run lint && npm testmust pass. - ๐ Follow Conventional Commits (
feat:,fix:,docs:โฆ).
Design decisions are documented as ADRs in docs/adr/.
| Doc | Contents |
|---|---|
docs/usage-examples.md |
Copy-paste setup recipes, endpoint examples, tuning, troubleshooting |
docs/adding-a-provider.md |
Step-by-step guide to contributing a new provider |
docs/adr/ |
Architecture decision records |
CHANGELOG.md |
Release history |
ISC ยฉ Md Mojahid
โญ Found this useful? Star the repo โ it helps others discover it!