router  by workweave

LLM model routing proxy for agentic systems

Created 2 months ago
554 stars

Top 57.0% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

workweave/router addresses the complexity and cost of managing multiple Large Language Model (LLM) providers. It offers a drop-in proxy that intelligently routes every prompt to the optimal model across OpenAI, Anthropic, Gemini, and open-source options, aiming to cut costs by 40-70% with sub-50ms latency. This benefits developers seeking efficient and performant LLM integrations within agentic systems.

How It Works

This project functions as a unified API gateway and intelligent router for LLM requests. It employs a "cluster scorer" derived from the Avengers-Pro research paper to dynamically select the best model for each individual prompt, moving beyond static configurations. The router natively speaks Anthropic Messages, OpenAI Chat Completions, and Gemini APIs, while also supporting open-source models via OpenRouter or any OpenAI-compatible endpoint. This approach ensures optimal performance and cost-efficiency on a per-request basis.

Quick Start & Requirements

A hosted quickstart is available via npx @workweave/router, requiring Node.js >= 18. Some paths may also need jq. For self-hosting the router and dashboard, Node.js >= 18, jq, and a PostgreSQL database are needed. Provider API keys (e.g., OpenRouter) are necessary. Configuration details and advanced options are available in the project's deeper documentation sections.

Highlighted Details

  • Achieves significant cost reductions (40-70%) by optimizing model selection.
  • Delivers low latency routing (<50ms) for real-time agentic systems.
  • Supports a wide array of LLM providers including OpenAI, Anthropic, Gemini, and numerous OSS models.
  • Features Bring Your Own Key (BYOK) security, keeping provider keys encrypted locally.
  • Provides out-of-the-box observability with OTLP traces compatible with major platforms like Datadog and Grafana.

Maintenance & Community

The project is developed by Weave, an engineering intelligence platform, and has been adopted by companies like Robinhood and PostHog. While GitHub Actions indicate active testing, no direct community channels (e.g., Discord, Slack) or roadmap links are provided in the README.

Licensing & Compatibility

The software is distributed under the Elastic License v2 (ELv2). This license may impose restrictions, particularly concerning offering the software as a service, and users should carefully review its terms for commercial use or integration into proprietary systems.

Limitations & Caveats

Integration with Cursor is noted as being in "early beta" and may exhibit performance variability. The ELv2 license itself represents a potential adoption caveat for certain commercial or SaaS use cases.

Health Check
Last Commit

17 hours ago

Responsiveness

Inactive

Pull Requests (30d)
267
Issues (30d)
16
Star History
526 stars in the last 30 days

Explore Similar Projects

Starred by Eric Zhang Eric Zhang(Founding Engineer at Modal) and Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI).

smg by lightseekorg

3.7%
364
High-performance LLM gateway for diverse inference backends
Created 7 months ago
Updated 1 day ago
Feedback? Help us improve.