Skip to main content

high-performance openai/anthropic-compatible llm proxy and load balancer

Project description

rolter

A high-performance, open-source LiteLLM-proxy alternative built in Rust with a TypeScript + shadcn/ui dashboard.

rolter is an OpenAI/Anthropic-compatible AI gateway that proxies commercial providers and load-balances self-hosted OpenAI-compatible fleets (e.g. 20–30 vLLM instances) with cache-aware routing, full RBAC, reload-free configuration, and cost/usage tracking.

Status: early scaffold. The data-plane gateway MVP runs today (OpenAI/Anthropic passthrough + balancing + virtual keys + metrics). The control plane, dashboard, and persistence are being built out — see ROADMAP.md and TODO.md.

Why rolter

  • Fast: a Rust data plane (Axum/Hyper/Tower on Tokio) with lock-free config reads and minimal-copy streaming.
  • Cache-aware load balancing: route prefix-heavy traffic to the vLLM replica most likely to have the KV cache warm — approximate today, precise (KV-events) on the roadmap.
  • Drop-in: speak the OpenAI and Anthropic APIs your clients already use.
  • Operable: virtual keys, budgets, rate limits, cost tracking, RBAC, and reload-free config changes from the UI.

Architecture

flowchart LR
  Client([OpenAI / Anthropic clients]) -->|/v1/*| GW["rolter-gateway<br/>(data plane)"]
  Admin([Dashboard]) --> CTL["rolter-control<br/>(control plane + UI host)"]
  GW -->|balanced + streamed| UP["Upstreams<br/>OpenAI · Anthropic · vLLM pool"]
  CTL -->|writes config| PG[("PostgreSQL")]
  CTL -->|publishes change events| RDS[("Redis")]
  RDS -->|hot-swap snapshot| GW
  GW -->|async batched logs| CH[("ClickHouse")]

See docs/architecture/overview.md for the full design.

Quick start (gateway MVP)

cp rolter.example.toml rolter.toml          # edit providers/routes
export OPENAI_API_KEY=sk-...                 # referenced by api_key_env
cargo run -p rolter-gateway -- --config rolter.toml
curl -s http://localhost:4000/v1/models \
  -H "Authorization: Bearer sk-rolter-dev"

curl -s http://localhost:4000/v1/chat/completions \
  -H "Authorization: Bearer sk-rolter-dev" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4o","messages":[{"role":"user","content":"hello"}]}'

GET /healthz and Prometheus GET /metrics are also exposed.

Install

# rust
cargo install --path crates/rolter-gateway

# uv (PyPI wheel built with maturin) — see docs/development/packaging.md
uv tool install rolter

# docker
docker compose -f docker/docker-compose.yml up -d

Repository layout

  • crates/rolter-core — config model, domain types, errors, telemetry
  • crates/rolter-balancer — load-balancing strategies (incl. approximate cache-aware)
  • crates/rolter-proxy — upstream forwarding, header injection, streaming
  • crates/rolter-store — repository traits + in-memory store (Postgres/Redis/ClickHouse next)
  • crates/rolter-auth — virtual keys, roles, access checks
  • crates/rolter-gateway — data-plane binary
  • crates/rolter-control — control-plane binary + static UI host
  • ui/ — Vite + React + shadcn/ui dashboard
  • docs/ — architecture, ADRs, API, development and deployment guides
  • migrations/, clickhouse/ — database schemas

Development

cargo build --workspace
cargo test --workspace
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings

Commits and PR titles follow Conventional Commits. See AGENTS.md and docs/development/contributing.md.

License

Apache-2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rolter-0.0.3-py3-none-win_amd64.whl (3.7 MB view details)

Uploaded Python 3Windows x86-64

rolter-0.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

rolter-0.0.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

rolter-0.0.3-py3-none-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file rolter-0.0.3-py3-none-win_amd64.whl.

File metadata

  • Download URL: rolter-0.0.3-py3-none-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for rolter-0.0.3-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 40bb411f58e963736f858fa31c61f57bf7eac6dc7cb2fec222acc606b9065800
MD5 d9de9de320b9bbfd357e33b3da42bcd6
BLAKE2b-256 abe16e4a1ac639cbab02aa82e9a4d551ff661cd794852a68d17db7680e5a1712

See more details on using hashes here.

File details

Details for the file rolter-0.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rolter-0.0.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e97d68a48a51688aa9b8ef3ed4af266dfdc5869f06dc373be72e83d177a3bb01
MD5 5991a0b44fece05ab4f3108f247d2898
BLAKE2b-256 aa14b3505c84c21d67833889be639d253c0aa3d21219dc23bc2b38eb238a6b41

See more details on using hashes here.

File details

Details for the file rolter-0.0.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rolter-0.0.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f6a819e28373863dffd8e347eecb9df80525043418d467cf02bf4ba4e368f9ea
MD5 5462de81e649dbbeb0e631f62a7caa0f
BLAKE2b-256 8adbe0d8d0c2111639a9a35f063d98d86320a7f384142ffe47e107489a65701f

See more details on using hashes here.

File details

Details for the file rolter-0.0.3-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rolter-0.0.3-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8491023ad804d9dc8f0ce5238ae6795b382ad9fd72dd44a2020af0cab55e4f87
MD5 99579e7a672dc3612c05caaca91b2b27
BLAKE2b-256 ddcf91f2314ba605e41b22fde82e43dd49aa255f279f9849de96da0e1799440b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page