Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>9Router for Github Copilot (OpenAI compatible)New to Visual Studio Code? Get it now.
9Router for Github Copilot (OpenAI compatible)

9Router for Github Copilot (OpenAI compatible)

Ho Trung Nhan

|
32 installs
| (1) | Free
Connect GitHub Copilot to 9Router and any OpenAI-compatible server for open-source models
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

9Router for GitHub Copilot

Use 9Router and any OpenAI-compatible model inside GitHub Copilot Chat — with automatic fixes for the rough edges that self-hosted models produce.

Quick Start

  1. Install from the VS Code Marketplace.
  2. Open Settings → search 9Router → set Server URL to your endpoint (e.g. http://localhost:20128/v1).
  3. Use the Configure Server command (Cmd+Shift+P → "9Router: Configure Server") to set your API key.
  4. In Copilot Chat, open the model picker → Manage Models → enable models under 9Router.
  5. Select a model and start chatting.

Why This Over Native BYOK?

VS Code's built-in BYOK works great for well-behaved models. 9Router adds a resilience layer for when things break:

  • Tool calls fail with bad JSON? Repairs truncated arguments and fills missing required fields.
  • Reasoning models leak <think> blocks? Routes them into Copilot's thinking UI, not your chat.
  • Context-length errors? Auto-detects the real limit and budgets tokens safely.
  • Model outputs tool names as text? Lowers temperature and stabilises formatting.

Inference stays on your server. No per-token fees. Doesn't consume Copilot premium quota.

Servers Supported

9Router, vLLM, Ollama, llama.cpp, LM Studio, LocalAI, LiteLLM — any OpenAI-compatible endpoint.

Key Settings

Setting Default What it does
9router-for-github-copilot.serverUrl http://localhost:8000/v1 Your inference server base URL
9router-for-github-copilot.defaultMaxTokens 262144 Fallback context window
9router-for-github-copilot.enableToolCalling true Allow agent tools (file ops, terminal, etc.)
9router-for-github-copilot.agentTemperature 0 Tool-call stability (lower = stricter)
9router-for-github-copilot.modelContextWindows {} Per-model context overrides, e.g. {"qwen3-8b": 32768}
9router-for-github-copilot.perModelOptions {} Per-model sampler params (temperature, top_p, etc.)

Commands

Command Purpose
9Router: Configure Server Set server URL and API key
9Router: Test Server Connection Verify connectivity and list models
9Router: Refresh Models Re-probe the server for model changes
9Router: Edit Custom Headers Manage custom HTTP headers (stored securely)
9Router: Show Output Log View debug output

Troubleshooting

Models not showing? Run curl <server-url>/v1/models to verify the server is up. Make sure the URL has no trailing /v1 or slash. Run the Test Server Connection command for a diagnostic.

Tool calls output as text instead of executing? Set Agent Temperature to 0, disable Parallel Tool Calling, and confirm your server has --enable-auto-tool-choice (vLLM).

Context overflow errors? Add the model to modelContextWindows with the correct limit. The extension learns the real limit from the error and retries once automatically.

Models not in the Agents window? Agents window runs in a separate process. Add this to settings and reload:

"extensions.supportAgentsWindow": {
  "hotrungnhan.9router-for-github-copilot": true
}

Utility Tasks (Titles, Commit Messages)

By default, Copilot sends chat titles and commit messages to GitHub. Route them to your own model instead:

  • Open Settings → set chat.utilityModel and chat.utilitySmallModel to a 9Router model.

Privacy

Prompts and code go to your server only. Copilot Chat (the VS Code host) may send its own auth, telemetry, and title requests to GitHub — route utility tasks to your server to minimise this.

Credits

This project is a fork of arbs-io/github-copilot-llm-gateway. Thanks to the original authors for the base extension.

License

MIT — see LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft