Allostate Router for Antigravity
Allostate dynamic self-improving semantic LLM router — monitor, manage, and visualize Allostate Router directly inside VS Code / Antigravity.

Overview
Allostate Router is a self-improving semantic LLM router that maintains optimal model routing between simple low-cost models and advanced reasoning models via online kNN exemplar lookups and LLM-as-a-judge writebacks. This extension provides a first-class integration for monitoring and managing the router from within your editor.
Features
🟢 Real-Time Status Bar Monitoring
A persistent status bar item shows whether your local Allostate Router proxy is online or offline, polling the /healthz endpoint every 5 seconds.
- Active:
✓ Allostate: Active — click to open the live dashboard
- Offline:
⊘ Allostate: Offline — highlights with a warning background
An activity bar panel displays live telemetry fetched from /stats:
- Total requests and exemplar count
- Route distribution with animated bar charts (simple / reasoning / vision)
- Cost savings — actual vs. counterfactual baseline
- Self-improvement metrics — judge evaluations & exemplars auto-inserted
- Recent request log with route badges, query previews, latency, and timestamps
🚀 Server Process Management
Start and stop the Allostate Router backend directly from the command palette or the sidebar toolbar — no terminal required.
| Command |
Description |
Allostate: Start Local Proxy |
Runs uv run uvicorn router.proxy:app --host 127.0.0.1 --port 8787 in your AI-Summit repo |
Allostate: Stop Local Proxy |
Gracefully terminates the running proxy subprocess |
Allostate: Open Dashboard |
Opens http://127.0.0.1:8787/ in your default browser |
Allostate: Check Status |
Force-refreshes health and shows a notification |
Allostate: Focus Telemetry Panel |
Focuses the sidebar telemetry webview |
🔌 OpenAI-Compatible Drop-in
Route code assistant completions through http://127.0.0.1:8787/v1/chat/completions targeting model allostate.
⚙️ Extension Settings
| Setting |
Default |
Description |
allostate.serverUrl |
http://127.0.0.1:8787 |
Base URL for the proxy server |
allostate.pollingInterval |
5000 |
Health-check interval in ms |
allostate.autoStartBackend |
false |
Auto-start the backend on activation |
allostate.backendPath |
../AI-Summit |
Path to AI-Summit backend repo |
Getting Started
Prerequisites
- VS Code ≥ 1.80.0 (or Antigravity)
- The AI-Summit repository cloned locally
- uv installed for Python dependency management
- Ollama running locally with at least
qwen3:4b pulled
Install from VSIX
code --install-extension allostate-router-antigravity-0.1.0.vsix
First Run
- Open the Command Palette (
Ctrl+Shift+P)
- Run Allostate: Start Local Proxy
- The extension will use the configured
allostate.backendPath (defaults to ../AI-Summit)
- The status bar will turn green when the backend is ready
- Open the Allostate sidebar to see live telemetry
Running the Backend Manually
If you prefer to start the backend yourself:
cd AI-Summit
uv run uvicorn router.proxy:app --host 127.0.0.1 --port 8787
Recompiling & Packaging
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch mode
npm run watch
# Package .vsix
npx @vscode/vsce package --no-dependencies
Architecture
allostate-router-antigravity/
├── src/
│ ├── extension.ts # Lifecycle, commands, status bar, subprocess
│ └── statsViewProvider.ts # Sidebar webview with live telemetry dashboard
├── package.json # Extension manifest
├── tsconfig.json # TypeScript config
├── .vscodeignore # Files excluded from .vsix
└── README.md
The extension communicates with the Allostate Router Python backend via HTTP:
GET /healthz — health check (polled every N seconds)
GET /stats — aggregated telemetry for the dashboard
POST /v1/chat/completions — OpenAI-compatible completions endpoint
License
MIT © KrishnakanthJ