Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Intelligent Agent RouterNew to Visual Studio Code? Get it now.
Intelligent Agent Router

Intelligent Agent Router

Adnan Okay

|
18 installs
| (1) | Free
Routes prompts to free or premium agents based on complexity and length
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Intelligent Agent Router

A VS Code extension that intelligently routes prompts to free or premium Copilot models based on complexity and length analysis.

Features

  • Automatic Complexity Analysis: Analyzes prompts based on:

    • Technical term density
    • Sentence complexity
    • Code block presence
    • Question depth
    • Overall length
  • Smart Model Routing: Automatically selects between free and premium Copilot models based on configurable thresholds

  • Manual Model Selection: Override automatic routing with --model parameter

  • Copilot Chat Integration: Use @agent-router directly in Copilot Chat

  • Help Command: Type help to see all features and usage examples

  • Visual Analysis: Real-time complexity scoring and routing decision display

Quick Start

  1. Open Copilot Chat (Ctrl+Alt+I)
  2. Type: @agent-router What is Docker?
  3. See automatic complexity analysis and model selection

Usage

Automatic Routing (Default)

@agent-router What is Docker?
@agent-router Explain machine learning algorithms with examples

Manual Model Selection

@agent-router --model gpt-5 What is quantum computing?
@agent-router --model claude-sonnet-4.5 Help me optimize this code
@agent-router --model gpt-4o Simple explanation of APIs

Get Help

@agent-router help
@agent-router --help
@agent-router features

Configuration

Configure the extension via VS Code settings:

{
  "intelligentAgentRouter.complexityThreshold": 70,
  "intelligentAgentRouter.lengthThreshold": 500,
  "intelligentAgentRouter.enableAutoRouting": true
}

Settings

  • complexityThreshold (default: 70): Complexity score (0-100) threshold to route to premium Copilot model
  • lengthThreshold (default: 500): Character count threshold to route to premium Copilot model
  • enableAutoRouting (default: true): Enable/disable automatic routing

Available Models

Free Tier Models

  • gpt-4o - Fast, general purpose
  • gpt-5-mini - Lightweight alternative
  • gpt-4.1 - Legacy model

Premium Tier Models

  • claude-sonnet-4.5 - Advanced reasoning (default for complex prompts)
  • gpt-5.2 - Latest GPT model
  • claude-opus-4.5 - Maximum capability
  • claude-haiku-4.5 - Fast premium option
  • gemini-2.5-pro - Google's advanced model
  • And more...

How It Works

The extension evaluates prompts using multiple factors:

  1. Technical Terms (×5 weight): Counts occurrences of technical keywords
  2. Sentence Complexity (×10 weight): Analyzes average sentence length
  3. Code Blocks (×15 weight): Detects code snippets in the prompt
  4. Question Depth (×20 weight): Evaluates question complexity (multi-part, conditional, comparative)
  5. Length Bonus: Considers overall prompt length

Based on these factors, a complexity score (0-100) is calculated. Prompts exceeding the complexity or length threshold are routed to premium Copilot models.

Installation

From VSIX Package

  1. Download the .vsix file
  2. Open VS Code
  3. Go to Extensions view (Ctrl+Shift+X)
  4. Click "..." menu → "Install from VSIX..."
  5. Select the downloaded .vsix file

From Source

  1. Clone this repository
  2. Run npm install to install dependencies
  3. Run npm run compile to build
  4. Press F5 to launch the extension in debug mode

Development

Build

npm run compile

Watch mode

npm run watch

Lint

npm run lint

Requirements

  • VS Code 1.85.0 or higher
  • Node.js 18.x or higher

Extension Settings

This extension contributes the following settings:

  • intelligentAgentRouter.complexityThreshold: Complexity score (0-100) to trigger premium model selection
  • intelligentAgentRouter.lengthThreshold: Character count to trigger premium model selection
  • intelligentAgentRouter.enableAutoRouting: Enable/disable automatic model routing

Release Notes

0.0.1

Initial release with:

  • Prompt complexity analysis across 5 dimensions
  • Automatic Copilot model routing (free vs premium)
  • Manual model selection with --model parameter
  • Copilot Chat integration with @agent-router
  • Help command for feature discovery
  • Real-time complexity scoring and model selection display
  • Support for all available Copilot models

License

MIT

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