Introducing Weave Router: per-request routing for coding agents
Why Weave built per-request coding routing: model selection, session caching and cost telemetry. Read the original launch account and current setup guidance.
On this page
Historical launch report, reviewed November 13, 2026. The architecture and production observations below describe the initial Router release. For the current policy, deployment scope and task-level evidence, use the Router product page, Router 2.0 results, and current source documentation. For current customer results, Weave reports average token-spend savings of 40% with Router; its July 2026 update reported Router cost cuts of 20–80%. The current self-hosted release includes a frozen HMM policy; it is not identical to the managed service.
Sending every coding request to one frontier model prices routine work at the same rate as the hardest reasoning. Reading a file, making a small edit and debugging a cross-file failure do not need the same model. Per-request routing lets the model change with the work.
Our early Claude Code workload analysis motivated a policy that could reserve frontier models for harder work and use cheaper models where they could handle the task.
Weave Router makes that model decision for the coding agent. The goal was to handle a changing mix of work without asking the engineer to keep switching models by hand.
The initial release: a proxy that picked a model per request
The initial release was a standalone Go proxy in front of configured model providers. It speaks whatever wire format your client already uses (Anthropic Messages, OpenAI Chat Completions, or Google Gemini generateContent), decides whether the request warrants a frontier model, and dispatches to the appropriate upstream. Clients update one base URL and nothing else.
Routing isn't a heuristic over prompt length or a hard-coded keyword list. Each request is embedded with a small ONNX model, scored against a frozen set of intent clusters, and matched to the lowest-cost candidate that has historically performed at parity with the frontier on that cluster. The scorer is derived from the AvengersPro research line, retrained on production traffic, and shipped as a versioned artifact bundle. Routing changes go through the same release process as any other code change.
The initial launch described two deployment paths. For the current deployment, follow the self-hosting reference and provider configuration: the public self-hosted release uses a frozen policy and calls configured embedding and inference providers. The launch setup below is historical.
-
Managed at launch. Sign up at router.weaveos.com, add your provider keys, and point your client at our base URL. Routing is active within minutes, using the artifact bundle we tune against production traffic on an ongoing basis.
-
Self-hosted at launch. The initial release offered a binary to run in your own infrastructure with your provider keys. Source at github.com/weave-os/router. Use the current deployment references above to assess its external provider connections.
The launch described these three surfaces:
-
The proxy. A drop-in replacement for the Anthropic Messages, OpenAI Chat Completions, and Gemini APIs. Existing clients need no changes beyond the base URL.
-
The decision endpoint. A read-only routing call that returns the model, provider, and rationale for any request body without proxying upstream. Useful for shadow runs, eval pipelines, and dashboards that need to inspect routing decisions before committing traffic.
-
The dashboard. API key issuance, BYOK credential rotation, and routing-decision telemetry with per-request cost, latency, and decision-reason drill-downs.
Inside an initial-release routing decision
When a request arrives, the router parses it into a format-agnostic envelope. The envelope is lazy: it doesn't deserialize the full body unless a cross-format emit is required, so a request that arrives as Anthropic and dispatches to an Anthropic upstream skips the JSON round-trip entirely.
The envelope's prompt is then embedded with a small in-process ONNX model. The embedding gets scored against a frozen set of cluster centroids, top-p selection narrows the field, and the candidate model with the highest score in the surviving clusters wins. The routing path adds low single-digit milliseconds of overhead on top of the upstream call.
Design choices in the initial release
Two design choices shaped the initial routing layer: the cost of completing a request and the state of the session around it.
Selection is multi-objective, not quality-maximizing. Within each surviving cluster, the scorer doesn't pick the highest-scoring candidate. It picks the candidate that wins on a cost / latency / verbosity composite, conditional on quality being at parity with the top option on that cluster. Cost was the obvious axis. In the initial Claude Code traffic analysis, we reported 80–85% lower request cost against the modeled cost of the originally requested frontier model; that was not a randomized comparison of completed-task quality. Latency matters because two models can be quality-equivalent and still differ by seconds on time-to-first-token, which affects how long the developer waits for a response. Verbosity matters because two models can be quality-equivalent on the answer and still differ 3–5x in output tokens, which is both a cost multiplier and a UX multiplier in agentic loops. This release treated all three as explicit signals in its selection policy.
Decisions are sticky per session, not per request. A naive router re-picks the optimal model on every turn, which sounds good in isolation and is catastrophic in practice for agentic workloads. The cost model of every major provider is built around prompt caching: cached input tokens are roughly an order of magnitude cheaper than fresh ones, and an agent loop that re-sends a multi-thousand-token system prompt on every turn relies on those cache hits compounding. Turn one warms a cache on provider A; if turn two routes to provider B, the agent pays the uncached rate to rebuild identical context, and the cache on A goes cold by the time turn three wants it back. The bill goes up, not down. Weave Router pins a session to its first routing decision, so cache hits compound the way the upstream provider intended. The scorer only revisits the decision at boundaries where the swap is actually cheaper end to end, after accounting for the cache-warmup cost on the new provider.
The cache failure mode we designed the initial release to avoid
Switching providers can trigger uncached billing for the session’s prompt and history, even when the new model has a cheaper token price.
A second failure mode is format translation. Anthropic cache-control markers, reasoning blocks and tool payloads affect how the next request works. Dropping them can change the agent's behavior or cost. The initial implementation therefore treated API compatibility as part of routing, rather than assuming every request could be reduced to plain messages.
Session pinning (covered above) addresses the first failure mode. The second one is in the format-translation layer. Cache-control markers, extended-thinking blocks, tool-use payloads, and Gemini thoughtSignature round-trips are preserved across format translation rather than collapsed to a lowest-common-denominator shape. The three wire formats (Anthropic, OpenAI, Gemini) are treated as peers. Same-format paths stay close to the inbound bytes; cross-format paths share a canonical intermediate representation. Capabilities added to one ingress surface consistently across the others.
The goal is to keep the agent's API and caching behavior intact, and to switch when the expected saving exceeds the cost of rebuilding context.
What we observed in the initial Claude Code traffic
At launch, we reported 80 to 85 percent lower request cost on the Claude Code traffic we analyzed, using the originally requested frontier model as the modeled cost baseline. The accompanying quality observation was not a randomized task-outcome comparison. These figures describe that traffic and counterfactual, not expected savings for a new team. The savings come from routing the routine majority of requests to open-source models via OpenRouter and reserving frontier models for the requests that warrant them. Semantic caching, scoped per cluster with per-cluster similarity thresholds, drives cost further down.
The engineering work was in preserving the client's behavior while changing the serving model. Format translation, session state and cost telemetry all affect whether a routing decision saves money across a complete session.
Managed billing at launch
At launch, Weave held the provider accounts, managed rate limits and billed usage through one credit balance. Customers did not need separate Anthropic, OpenAI, OpenRouter and Gemini invoices for that managed traffic. For current Router terms, see Router billing.
Managed operation also removes recurring provider work from the platform team: separate keys, rate limits, upstream balances and credential rotation. Self-hosting leaves those responsibilities with your organization. Both paths need to be included when comparing the full cost of operating a router.
At launch, the self-hosted path used your own provider keys, leaving the upstream relationships and billing with each provider. For current deployment requirements, inspect the frozen self-hosted policy and its external provider path; it is distinct from the managed policy.
Features that weren't economical at frontier rates
Lower inference costs make high-volume AI features less expensive to test and operate. Examples include background agents, codebase summaries and retrieval workflows. Frontier models remain available for requests that need them, while the policy can use lower-cost models for routine steps.
The cost of the complete workflow still includes retries, escalation and any cache rebuilding. Per-request usage records make those costs visible.
The routing system around the model
At launch, the roadmap included per-customer routing artifacts that adapt to a workload's distribution over time, a learned cache beyond cosine similarity, and tighter feedback between live quality signals and routing decisions. These were directions for the product, not capabilities established by the initial release.
The launch made the router and its source available. The current installation path follows.
What Weave adds over a fixed-model API connection
A direct model connection leaves the client or engineer responsible for selecting the model. Weave adds a policy that can respond to the work in the session. Routine requests can use a lower-cost model, while a difficult step or repeated failure can justify a stronger one. Cache costs are part of that choice.
The current managed product also provides organization-level model controls, client setup and per-request reporting. That makes it possible to inspect which model served a request and what the session consumed. Provider capacity and plan fees still matter when calculating the total bill.
The initial traffic observations above are separate from the later task benchmark. In the September Router 2.0 evaluation, Weave used 48–54% less cost per trial and finished 2.2–2.5 times faster than direct GPT-6 Astra across two coding benchmarks. Terminal-Bench solve rates were 62.1% versus 60.6%; SWE-Atlas rates were 62.1% versus 66.1%. The full results preserve the task counts, paired design and quality limits.
Current request-level diagnostics
The current Router analytics export exposes one row per upstream model call. It includes requested and served models, provider, routing-policy identifiers, failover markers and the upstream response status. A request can produce more than one call when retries occur; request_id lets a team group those attempts when comparing complete requests.
Timing fields separate routing latency, upstream latency, total latency and time to first token where available. The same export records tool-use blocks and invalid tool arguments, so engineers can investigate a fast response that still failed the coding client's expected format. Read-only analytics keys are separate from inference credentials, and the export contains call metadata rather than prompt or completion text. This adds operational detail to the per-request routing architecture described at launch.
Launch setup and current setup guide
The launch instructions below describe the initial managed setup. To start a new installation, use the current Router quickstart for the supported clients, account requirements and plan. At launch, the setup used router.weaveos.com, provider keys and this installer command:
npx @weave-os/router
The launch installer prompted for scope, retrieved a key from the dashboard, and configured the client base URL.
Current setup, November 2026: use an explicit client flag such as npx @weave-os/router --claude or --copilot. Connect Claude Code, Codex, GitHub Copilot CLI, OpenCode or Pi without changing coding agents. Claude Code 2.1.242+ gets Weave Auto in the native model picker; another model choice passes through when the organization can serve it. GitHub Copilot CLI gets weave/auto. Engineers can try automatic routing while keeping deliberate model choices. See the installation guide for controls and the separate local Claude Desktop setup.
For a self-hosted evaluation, plain make up runs a stub classifier. Follow the frozen HMM setup with make up-hmm to load the public policy release. It differs from the managed policy and calls Google’s embedding API by default.
See the work behind your AI spend
Compare code output, AI cost and quality, then inspect the work behind the trend.