Agent Router —
|
| Command | Description |
|---|---|
@router <prompt> |
Score, route and answer your prompt |
@router /help or @router /? |
Show the full help page |
@router /explain <prompt> |
Show routing decision (score, tier, model) — no LLM call |
@router --model <name> <prompt> |
Pin a specific model, bypass auto-routing |
Examples
@router how do I reverse a string in Python?
→ 🟢 Free tier (gpt-4o) — low complexity
@router design a distributed OAuth2 auth system with Kubernetes and Redis caching
→ 🔴 Premium tier (claude-3.5-sonnet) — high complexity
@router --model claude-3.5-sonnet refactor my auth module
→ 📌 Pinned model (claude-3.5-sonnet)
@router /explain refactor my authentication module for microservices
→ Shows score breakdown without making any model call
@router /help
→ Shows full help, available models, and tool list
Configuration
| Setting | Type | Default | Description |
|---|---|---|---|
agentRouter.freeThreshold |
number |
70 |
Complexity score (0–100). Scores ≤ this go to a free model. |
agentRouter.agentMode |
boolean |
true |
Enable/disable the full agentic tool-calling loop. |
Open Settings (Ctrl+,) and search agentRouter to adjust.
Free Model Families
gpt-4.1, gpt-4o, gpt-5-mini
All other available Copilot models (e.g. claude-sonnet-4.6, gemini-3-pro, gpt-5.3-codex) are treated as premium.
Complexity Scoring
Prompts are scored 0–100 using fast non-blocking keyword heuristics:
| Factor | Points | Trigger |
|---|---|---|
| Base score | +10 | All prompts |
| Length bonus | +25 | Long prompts |
| Multi-step structure | +8 | 4+ lines |
| Dense technical syntax | +7 | Code-heavy content |
| Architecture / Distributed | +20 | kubernetes, microservices, load balancing… |
| Security / Auth / Encryption | +20 | OAuth2, JWT, TLS, cryptography… |
| ML / Neural Networks | +18 | transformers, NLP, embeddings… |
| Performance / Optimization | +15 | caching, indexing, profiling… |
| Refactoring / Migration | +12 | legacy, upgrade, deprecation… |
| Deep Debugging / Root-cause | +10 | memory leak, deadlock, race condition… |
Agentic Tools (30 tools)
When agentRouter.agentMode is true, @router can call these tools during the response:
| Category | Tools |
|---|---|
| File | readFile, writeFile, editFile, deleteFile, renameFile, copyFile, createDirectory, readFileLines, findAndReplace |
| Search | searchFiles, listDirectory |
| Code | getSymbols, getProblems, showDiff |
| Editor | openFile, getSelectedText, insertSnippet, listOpenEditors |
| Terminal | runCommand, runTests, getTerminalOutput, openTerminal |
| Git | getGitStatus |
| VS Code | getWorkspaceInfo, getExtensionSettings, getExtensionList, showNotification |
| Clipboard | clipboardRead, clipboardWrite |
| Network | fetchUrl |
Development
git clone https://github.com/adnnoky/github-copilot-agent-router.git
cd github-copilot-agent-router
npm install
npm run compile # one-time build
npm run watch # watch mode
# Press F5 to launch Extension Development Host
# Package for distribution
npx vsce package
# Install locally
code --install-extension agent-router-extension-1.5.0.vsix
License
MIT — see LICENSE