zrouter vs LiteLLM, OpenRouter & Portkey
An architecture-level comparison for engineering and FinOps leaders evaluating self-hosted vs managed LLM gateways.
| Dimension | zrouter (Rust) | LiteLLM (Python) | OpenRouter (SaaS) | Portkey |
|---|---|---|---|---|
| Runtime & Footprint | Single ~13 MiB Rust binary (~11 MB idle RSS) | Python + Uvicorn + Prisma (~300–600 MB RSS) | Managed SaaS | Node/Edge proxy + SaaS control plane |
| BYOK Token Markup | 0% (direct provider billing) | 0% self-hosted | ~5.5% credit/card fee | Control plane subscription |
| Protocol Translation | OpenAI, Anthropic, Responses/Codex, Gemini /v1beta, Rerank, Batch | OpenAI-centric proxy | OpenAI-compatible | OpenAI-compatible |
| Smart Routing | Built-in auto/* CPU classifier (~3–35 µs) + online bandit | Basic latency/usage routing | Auto router (opaque) | Rule-based routing |
| Semantic Caching | Pure-Rust local cosine cache (zero Redis/GPU) | Requires Redis + embedding model | Provider-side only | Managed SaaS cache |
| Security & Compliance | SSRF DNS pinning, PII/PEM redactor, injection firewall, EU residency, SHA-256 audit chain | Enterprise tier for SSO/RBAC/audit | Cloud multi-tenant | Enterprise tier |