Sign In

@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

LLMs from your terminal through your Vaaya wallet, no API keys: ask one-shot questions, chat, or run a local OpenAI-compatible proxy that routes every request to the cheapest capable model (Kimi, GPT, Gemini, Claude, DeepSeek and 300+ more).

Source
npmnpm
Version
0.3.0
Version published
Maintainers
2
Created
Source

@vaaya/router

LLMs from your terminal through your Vaaya wallet. No API keys, no per-provider accounts: one login, 300+ models (Kimi, GPT, Gemini, Claude, DeepSeek and more), billed per token at model cost plus 3%.

Quick start

npx @vaaya/router login     # once; sign up right there if you're new
npx @vaaya/router "explain CORS in one paragraph"

If you have the vaaya CLI (npm i -g vaaya-cli), plain vaaya is the same thing with the full toolset already on: it runs --mcp chat for you.

The answer streams back. No model named means auto-routing: short and simple goes to a cheap model, tools/code/long context go up-tier.

Four ways to use it

Ask once (pipes work; the answer is stdout, the price trailer is stderr, so piping the output onward stays clean):

npx @vaaya/router "why is my docker build slow"
git diff | npx @vaaya/router "write a commit message"
cat error.log | npx @vaaya/router --best "find the root cause"

Chat (a running conversation in your terminal):

npx @vaaya/router
> whats a monad
> /model kimi-k3
> now explain it like moonshot would

Tools (--tools lets the model act mid-answer, paid from the same wallet):

npx @vaaya/router --tools "read https://news.ycombinator.com and summarize the top story"
npx @vaaya/router --tools "find the email of Jane Doe at stripe.com"

The model gets web_search (1 cent), read_page (1 cent), and find_email (4 cents); every call prints as it runs. Tool mode defaults to the mid tier for reliable function calling and answers without streaming.

Full Vaaya toolset (--mcp) gives the model everything your agents get, live from the MCP server: consult, use (image/video/audio generation, scraping, research, enrichment, sandboxes, email), account tools, and any suite you have unlocked:

npx @vaaya/router --mcp     # chat where the model can do anything Vaaya does
npx @vaaya/router --mcp "find 5 seed-stage fintech founders in London"

The tool list is fetched at session start, so it always matches what your agents see. llm and vaaya_logout are excluded (recursion and disconnect-yourself hazards).

Serve (an OpenAI-compatible endpoint for coding agents):

npx @vaaya/router serve          # http://localhost:4141/v1
export OPENAI_BASE_URL=http://localhost:4141/v1
export OPENAI_API_KEY=vaaya      # any value; real auth is your Vaaya login

From an agent via MCP: agents connected to the Vaaya MCP can call the llm tool directly, no proxy or base URL needed. Same wallet, same pricing.

Model routing

  • vaaya/auto (the default) 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 route to the frontier tier.
  • --cheap / --mid / --best (or models vaaya/cheap|mid|best) force a tier directly.
  • --model <id> (or any concrete model string, e.g. anthropic/claude-opus-5, moonshotai/kimi-k3) passes through untouched.

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

Pricing

Whatever the model costs on OpenRouter, plus 3%, from your prepaid Vaaya balance. Typical calls: cheap tier well under a tenth of a cent, best tier 1 to 3 cents. Sub-cent usage accumulates and settles in 1 cent steps; every charge is visible at vaaya.ai/transactions. A $10/day per-account inference cap applies.

Commands

vaaya-router "question ..."        # one-shot ask (streams; --cheap/--mid/--best/--model)
vaaya-router                       # chat session
vaaya-router serve [--port N]      # OpenAI-compatible proxy (default 4141)
vaaya-router login                 # interactive browser login
vaaya-router login --token vst_... # login with a setup token, no browser

Configuration

Env varDefaultPurpose
VAAYA_LLM_BASEhttps://vaaya.aiHosted API origin (override for self-hosting or a preview deploy).

Notes

  • The proxy binds 127.0.0.1 only and rejects cross-origin browser requests.
  • OPENAI_API_KEY is required by most OpenAI-compatible clients but is ignored by the proxy; authentication is the stored Vaaya login from login (same credential store as @vaaya/mcp, one login covers both).
  • If there are no cached credentials, ask/chat kick off the device-code login inline; the proxy responds 401 telling the client to run login.

MIT © Vaaya

Keywords

llm

FAQs

Package last updated on 04 Aug 2026

Related posts