New:Socket for Asana Is Now Available.Learn more
Get Started

@vaaya/router

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaaya/router

Local LLM router for coding agents. Point OPENAI_BASE_URL at localhost, pay per token from your Vaaya wallet, and every request runs on the cheapest capable model.

Source
npmnpm
Version
0.1.0
Version published
Maintainers
2
Created
Source

@vaaya/router

Local, OpenAI-compatible LLM proxy for coding agents, backed by your Vaaya wallet. Point OPENAI_BASE_URL at it, and every request runs on the cheapest model capable of handling it, billed per token from your Vaaya balance. No provider API keys to manage.

Quick start

npx @vaaya/router login
npx @vaaya/router

The first command opens a browser to connect your Vaaya account (or accepts a setup token with --token vst_..., e.g. npx @vaaya/router login --token vst_xxx). The second starts the proxy on :4141:

vaaya router listening on http://localhost:4141/v1
  point your agent at it:
    OPENAI_BASE_URL=http://localhost:4141/v1
    OPENAI_API_KEY=vaaya (any value, auth uses your Vaaya login)
  models: vaaya/auto (routed), vaaya/cheap, vaaya/mid, vaaya/best, or any OpenRouter slug

Point your agent's OpenAI-compatible client at that base URL and it will work exactly as it does against api.openai.com, except the model list and billing come from Vaaya.

OPENAI_API_KEY is required by most OpenAI-compatible clients but is ignored by the proxy. Set it to any non-empty string. The proxy authenticates upstream using the credentials from npx @vaaya/router login, stored on disk exactly like @vaaya/mcp's login (same credential store, one login covers both).

Model routing

  • vaaya/auto (or any other unrecognized vaaya/* model) is classified heuristically from the request: short, tool-free, code-free prompts route to the cheap tier; tool calls or code content route to mid; very large contexts (or tool calls over a large context) route to the frontier tier.
  • vaaya/cheap, vaaya/mid, vaaya/best force a tier directly.
  • Any other model string (a concrete OpenRouter slug such as anthropic/claude-opus-5) passes through untouched, no rewriting.

GET /v1/models lists the four vaaya/* aliases plus every concrete model in the current tier table, so agent UIs that populate a model picker from that endpoint show the full set.

Configuration

Env varDefaultPurpose
VAAYA_LLM_BASEhttps://vaaya.aiHosted API origin the proxy forwards to (override for self-hosting or a preview deploy).
--port N4141Local port the proxy listens on.

Commands

vaaya-router                       # start the proxy (default command)
vaaya-router --port 5000           # start on a different port
vaaya-router login                 # interactive browser login
vaaya-router login --token vst_... # login with a setup token, no browser

If a request comes in with no cached credentials, or the hosted endpoint rejects a cached token, the proxy responds with a 401 telling you to run npx @vaaya/router login.

MIT © Vaaya

Keywords

llm

FAQs

Package last updated on 03 Aug 2026

Related posts