This is an early release preview. You may encounter bugs.
Router logo
Unclaimed

Tool inference

Router

Model router for agentic systems. Routes every prompt to the right model in <50ms. Cut costs 40-70% with just an endpoint change.

B 70/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About Router.

Router (Weave Router) is a model-routing proxy for coding agents and other LLM applications. Clients such as Claude Code, Codex, OpenCode, and Cursor point at it instead of a provider, and it chooses a model from the enabled providers for every upstream API request, which it calls an action rather than a turn. The aim is to send each action to the cheapest model that meets the quality bar and keep frontier models for the requests that need them.

Routing uses a cluster scorer derived from the Avengers-Pro research method, running an in-process ONNX embedder on the router host rather than asking an LLM to classify the prompt. An optional frozen HMM policy can run as a companion container. The router speaks Anthropic Messages, OpenAI Chat Completions, and the native Gemini API, including streaming, tools, and vision, and reaches open models such as DeepSeek, Kimi, GLM, Qwen, Llama, and Mistral through OpenRouter or any OpenAI-compatible endpoint. A route endpoint returns the routing decision without calling a provider.

It runs as a hosted service or self-hosted with Postgres and a dashboard. Provider keys are bring-your-own, encrypted at rest, and prompts go from the router straight to the configured provider. An installer wires Claude Code, Codex, OpenCode, and pi to the router, adds commands to force or release a specific model, switch routing on or off, and choose which models the router may pick, and leaves the rest of each client's configuration untouched.

Every routed response reports its cost and cache-token usage, a per-session endpoint returns committed cost and savings, and raw routing decisions export as paginated NDJSON for analysis. OpenTelemetry traces go to the built-in dashboard or to collectors such as Honeycomb, Datadog, and Grafana.

  • Per-action routing: a cluster scorer with an on-box embedder picks a model for every upstream request, with an optional HMM policy sidecar
  • Multi-API proxy: Anthropic Messages, OpenAI Chat Completions, and Gemini generateContent endpoints with streaming, tools, and vision
  • Open-model coverage: DeepSeek, Kimi, GLM, Qwen, Llama, and Mistral through OpenRouter or any OpenAI-compatible endpoint
  • Coding-agent installers: one installer configures Claude Code, Codex, OpenCode, or pi per user or per repository, and reverses cleanly on uninstall
  • Model pinning and toggles: commands to force or release a model, switch routing on or off, and enable or disable which models the router may choose
  • Routing preview: a route endpoint returns the decision for a request without calling any provider
  • Bring your own keys: provider keys stay on the router host, encrypted at rest, and prompts never pass through Weave when self-hosted
  • Cost reporting: per-response cost and cache-token headers, a final cost object on streams, and a per-session cost and savings endpoint
  • Analytics export: routing decisions as cursor-paginated NDJSON with a field dictionary and price book
  • Observability: OpenTelemetry traces to the Weave dashboard or to Honeycomb, Datadog, and Grafana
  • Benchmark harness: reproduces SWE-Atlas QnA and Terminal-Bench comparisons of routed against direct and OpenRouter runs

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Router.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Router →

Browse the catalog