zrouter vs LiteLLM, OpenRouter & Portkey

An architecture-level comparison for engineering and FinOps leaders evaluating self-hosted vs managed LLM gateways.

Dimensionzrouter (Rust)LiteLLM (Python)OpenRouter (SaaS)Portkey
Runtime & FootprintSingle ~13 MiB Rust binary (~11 MB idle RSS)Python + Uvicorn + Prisma (~300–600 MB RSS)Managed SaaSNode/Edge proxy + SaaS control plane
BYOK Token Markup0% (direct provider billing)0% self-hosted~5.5% credit/card feeControl plane subscription
Protocol TranslationOpenAI, Anthropic, Responses/Codex, Gemini /v1beta, Rerank, BatchOpenAI-centric proxyOpenAI-compatibleOpenAI-compatible
Smart RoutingBuilt-in auto/* CPU classifier (~3–35 µs) + online banditBasic latency/usage routingAuto router (opaque)Rule-based routing
Semantic CachingPure-Rust local cosine cache (zero Redis/GPU)Requires Redis + embedding modelProvider-side onlyManaged SaaS cache
Security & ComplianceSSRF DNS pinning, PII/PEM redactor, injection firewall, EU residency, SHA-256 audit chainEnterprise tier for SSO/RBAC/auditCloud multi-tenantEnterprise tier