Kaeso vs LiteLLM: architecture, benchmarks and trade-offs
A factual comparison of Kaeso 0.7.0 and LiteLLM (Python and Rust) across throughput, streaming latency, licensing, SSO, budgets, routing and operations.
- Published
- Reading time
- 5 min
- Author
- Kaeso Team

Teams searching for a self-hosted alternative to LiteLLM usually run into one of three limits: Python proxy overhead under load, enterprise-gated SSO and governance features, or growing config.yaml files that become hard to audit across teams. Kaeso is an MIT-licensed AI gateway written in Rust that targets those exact constraints, while trading away LiteLLM's long tail of niche providers and external observability callbacks.
On BerriAI's own ai-gateway-bench (opens in a new tab) with two dedicated cores and 64 clients, Kaeso 0.7.0 served 6,338 requests a second (5,324 with ClickHouse request logs enabled), compared with 3,211 requests a second for unreleased LiteLLM Rust (main) and 74 requests a second for LiteLLM Python 1.110.2. Full tables, scripts, image digests and raw archives are published on kaeso.app/benchmarks.
Side-by-side summary01
Checked on 23 November 2026 against both repositories, documentation and our published ai-gateway-bench run. See also the broader five-gateway matrix on /compare.
- Language
- Kaeso 0.7.0
- Rust
- LiteLLM Python 1.110.2
- Python
- LiteLLM Rust (
main) - Rust (unreleased)
- Licence
- Kaeso 0.7.0
- MIT (entire repo)
- LiteLLM Python 1.110.2
- MIT, except
enterprise/ - LiteLLM Rust (
main) - MIT, except
enterprise/
- Capacity (2 cores, 64 clients)
- Kaeso 0.7.0
- 6,338 req/s (5,324 logs on)
- LiteLLM Python 1.110.2
- 74 req/s
- LiteLLM Rust (
main) - 3,211 req/s
- Added latency at 16 clients (p50 / p99)
- Kaeso 0.7.0
- +0.54 / +1.47 ms
- LiteLLM Python 1.110.2
- +188.35 / +215.66 ms
- LiteLLM Rust (
main) - +0.69 / +2.26 ms
- Streaming p99 chunk gap (direct: 7.5–7.8 ms)
- Kaeso 0.7.0
- 7.8 ms (8.1 ms logs on)
- LiteLLM Python 1.110.2
- 34.0 ms
- LiteLLM Rust (
main) - 40.4 ms
- Streamed Claude Code / Codex session
- Kaeso 0.7.0
- 41.7 / 48.3 ms
- LiteLLM Python 1.110.2
- 700.5 / 703.2 ms
- LiteLLM Rust (
main) - 432.1 / 612.9 ms
- Peak memory in benchmark
- Kaeso 0.7.0
- 164 MB + 271 MB Postgres/Valkey
- LiteLLM Python 1.110.2
- 746 MB
- LiteLLM Rust (
main) - 86 MB (no database)
- OIDC SSO, SCIM and audit logs
- Kaeso 0.7.0
- Included under MIT, no user cap
- LiteLLM Python 1.110.2
- Up to 5 SSO users free; Enterprise beyond
- LiteLLM Rust (
main) - Enterprise
- Built-in providers
- Kaeso 0.7.0
- 50 + custom local servers
- LiteLLM Python 1.110.2
- 100+ providers
- LiteLLM Rust (
main) - Subset under active development
- Configuration
- Kaeso 0.7.0
- Web console, Platform API, MCP
- LiteLLM Python 1.110.2
config.yaml+ Admin UI- LiteLLM Rust (
main) config.yaml
- Budget enforcement
- Kaeso 0.7.0
- Worst-case reservation in Valkey
- LiteLLM Python 1.110.2
- Virtual key and team budgets in Postgres
- LiteLLM Rust (
main) - In progress
| Area | Kaeso 0.7.0 | LiteLLM Python 1.110.2 | LiteLLM Rust (main) |
|---|---|---|---|
| Language | Rust | Python | Rust (unreleased) |
| Licence | MIT (entire repo) | MIT, except enterprise/ | MIT, except enterprise/ |
| Capacity (2 cores, 64 clients) | 6,338 req/s (5,324 logs on) | 74 req/s | 3,211 req/s |
| Added latency at 16 clients (p50 / p99) | +0.54 / +1.47 ms | +188.35 / +215.66 ms | +0.69 / +2.26 ms |
| Streaming p99 chunk gap (direct: 7.5–7.8 ms) | 7.8 ms (8.1 ms logs on) | 34.0 ms | 40.4 ms |
| Streamed Claude Code / Codex session | 41.7 / 48.3 ms | 700.5 / 703.2 ms | 432.1 / 612.9 ms |
| Peak memory in benchmark | 164 MB + 271 MB Postgres/Valkey | 746 MB | 86 MB (no database) |
| OIDC SSO, SCIM and audit logs | Included under MIT, no user cap | Up to 5 SSO users free; Enterprise beyond | Enterprise |
| Built-in providers | 50 + custom local servers | 100+ providers | Subset under active development |
| Configuration | Web console, Platform API, MCP | config.yaml + Admin UI | config.yaml |
| Budget enforcement | Worst-case reservation in Valkey | Virtual key and team budgets in Postgres | In progress |
Throughput, streaming and agent workloads02
The gap between a compiled Rust gateway and a Python proxy shows up most clearly under concurrency and streaming coding-agent traffic:
- High concurrency. With 64 clients hitting a zero-latency mock on two cores, Kaeso 0.7.0 handled 6,338 req/s with 314 µs of CPU per request. LiteLLM Python reached 74 req/s (13,563 µs CPU per request) and added +188 ms median latency at 16 clients. Unreleased LiteLLM Rust reached 3,211 req/s (573 µs CPU per request), about half of Kaeso's capacity.
- Streaming smoothness. Modern coding tools such as Claude Code and Codex stream long SSE responses full of tool calls. Kaeso's 99th-percentile gap between streamed chunks was 7.8 ms against a 7.5 ms direct baseline. LiteLLM Rust's was 40.4 ms and LiteLLM Python's was 34.0 ms, which pushed streamed Codex session overhead to 612.9 ms on LiteLLM Rust and 703.2 ms on LiteLLM Python versus 48.3 ms on Kaeso.
- Work done per request. During the benchmark, Kaeso verified a project API key, checked allowed models and wrote usage to PostgreSQL (and full request rows to ClickHouse in the logs-on run). Both LiteLLM builds checked a single static master key and stored nothing.
Read the full analysis in Kaeso on LiteLLM's own benchmark and Benchmarking AI gateways honestly.
Licensing, SSO and team governance03
LiteLLM splits open-source MIT features from commercial features under enterprise/. Free self-hosted SSO stops at five users; larger organizations, SCIM provisioning, custom roles and full governance workflows require a paid enterprise licence.
Kaeso ships under one MIT licence in one repository (logicplanes/kaeso) with no paid edition. Every self-hosted install includes:
- OpenID Connect single sign-on with verified email domains and optional mandatory SSO or two-factor authentication.
- SCIM 2.0 user and group provisioning with SSO group rules that map identity-provider groups to organizations, projects and roles.
- Built-in roles plus up to 50 custom fine-grained roles per organization, service accounts for software workloads, and instance, organization and project audit logs.
Budgets, routing and strict translation04
The two gateways also make different engineering choices on the request path:
- Hard spend budgets without race conditions. Kaeso reserves each request's worst-case cost in exact decimal USD inside Valkey before calling the upstream provider, then reconciles actual usage after the reply. Twenty parallel requests cannot blow past a
$50daily cap while streams are in flight. Limits nest strictly across project, member or service account, and API key, while displaying spend in the organization's chosen currency at daily ECB rates (Hard budgets, limits and currencies). - Alias routes and sticky key pools. Instead of maintaining fallback lists in YAML, Kaeso configures routes on model aliases with ordered fallbacks by error kind (
unavailable,limited,unsupported,rejected), conditions on headers, formats or token counts, and weighted splits (Retries and fallbacks). When a project holds multiple keys for one provider, Kaeso draws a key per caller by weight so Anthropic and OpenAI prompt caches stay warm (Provider key pools). - Strict KPP translation. Every request is decoded into the Kaeso Provider Protocol (KPP) and encoded for the target provider across OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, the Gemini API and ElevenLabs. If a provider cannot honour a parameter your app sent, Kaeso refuses the request naming the field rather than silently dropping it.
Where LiteLLM is ahead05
Choose LiteLLM, or keep it next to Kaeso, when any of these matter most to your team:
- Long-tail provider coverage. LiteLLM ships adapters for more than a hundred providers and legacy endpoints. Kaeso 0.7.0 ships 50 built-in providers (supported providers) plus OpenAI-compatible custom providers for local and private servers. If you need a provider Kaeso does not build in, you can also run LiteLLM behind Kaeso as a custom provider.
- External observability callbacks. LiteLLM includes native callback integrations for Langfuse, Datadog, S3, Helicone and dozens of telemetry sinks. Kaeso stores request logs in its own ClickHouse instance, exposes Prometheus metrics on port 9100 and exports CSV or JSON Lines from the console and Platform API, without built-in third-party log forwarders.
- Memory footprint without a database. In our benchmark, LiteLLM Rust peaked at 86 MB with zero database dependencies, whereas Kaeso peaked at 164 MB plus 271 MB for PostgreSQL and Valkey (and more when ClickHouse request logging is turned on).
- Single-client p99 latency. At concurrency 1, LiteLLM Rust's p99 added latency was +0.98 ms against Kaeso's +1.66 ms across every round.
- Pass-through routes and moderation endpoints. Kaeso translates every request through KPP and does not provide arbitrary pass-through routes or a
/v1/moderationsendpoint.
Switching from LiteLLM to Kaeso06
Because Kaeso speaks both the OpenAI API (/v1) and the Anthropic Messages API (/), applications already pointing at a LiteLLM proxy move by changing only base_url and the API key. Keep LiteLLM running while you migrate one service at a time; our step-by-step guide Migrate from LiteLLM in 5 minutes maps every config.yaml block, virtual key field and fallback rule directly to Kaeso.
Product names in this article belong to their owners and are used only to name the software and services involved. Kaeso is not affiliated with or endorsed by them.
By Kaeso Team


