Skip to content
reaatechREAATECH

reaatech/llm-router

0Last commit: Jun 4, 2026GitHub →

These packages give you a config-driven LLM routing engine that selects models based on cost, latency, capability, or a two-tier judgment strategy, with automatic fallback chains and circuit breakers when models fail. You would adopt them to manage multi-provider LLM costs, enforce daily budgets, and add structured degradation paths without writing provider-specific orchestration code. The system is built as a set of independent packages—core types, engine, strategies, fallback, telemetry, MCP server, and CLI—that compose through a shared config schema and a single `executeModel` callback, keeping provider SDKs out of the router itself.

Packages

7 packages

@reaatech/llm-router-cli

v1.0.1
A CLI that provides four commands—`route`, `benchmark`, `cost-report`, and `validate-config`—for routing prompts through configurable LLM strategies, benchmarking model performance with latency and cost statistics, generating cost summaries per budget period, and validating router configuration files.
status
published
published
2 days ago

@reaatech/llm-router-core

v1.0.0
Core TypeScript types, Zod schemas, and input validation for the llm-router ecosystem, providing 30+ domain types and 11 runtime validation schemas for model definitions, routing requests, configurations, budgets, quality scores, and cost telemetry. Exports composable enums, circuit breaker types, and dual ESM/CJS modules with zero runtime dependencies beyond `zod`.
status
published
published
22 days ago

@reaatech/llm-router-engine

v1.0.1
A config-driven `LLMRouter` class that orchestrates model selection, fallback chains, cost tracking, A/B testing, quality scoring, and observability into a single routing decision for LLM calls. It requires an `executeModel` callback or registered provider clients to actually dispatch requests.
status
published
published
2 days ago

@reaatech/llm-router-fallback

v1.0.0
A function that creates ordered fallback chains for LLM calls, with per-model circuit breakers and exponential-backoff retry logic, returning a `FallbackChain` instance whose `executeFrom` method automatically tries the next model when one fails.
status
published
published
22 days ago

@reaatech/llm-router-mcp

v1.0.0
An MCP server that exposes three tools—`route_request`, `get_model_info`, and `get_cost_report`—for routing LLM requests through a pluggable router implementation via the Model Context Protocol. It provides a `createMCPServer` factory function that returns an `MCPServer` class instance, which requires a `RouterInterface` implementation and auto-detects stdio or Streamable HTTP transport.
status
published
published
22 days ago

@reaatech/llm-router-strategies

v1.0.0
A set of pluggable routing strategies (CostOptimized, LatencyOptimized, JudgmentBased, CapabilityBased) and a priority-based `StrategyOrchestrator` that evaluates them in order to select the best LLM model for each request based on cost, latency, or capability constraints.
status
published
published
22 days ago

@reaatech/llm-router-telemetry

v1.0.0
A set of classes (`CostTracker`, `BudgetManager`, `CostReporter`) and a `MetricsCollector` facade for tracking per-request LLM costs, enforcing daily budget limits with configurable soft/hard enforcement and alert callbacks, and exposing OpenTelemetry-compatible metrics. Designed to pair with `@reaatech/llm-router` but usable standalone.
status
published
published
22 days ago

Comments

Sign in with GitHub to comment and vote.

Loading comments…