Rust Migration
LiteLLM is moving to Rust
See what already runs on Rust and what is next.
Migration tracker
Where we are today
12% of migrated to Rust, shown as a .
Scaffold100%of 4 pts
- Python bridge
- Python host calls
- Async bridge
- HTTP client
- Streaming
- Config
- Tracing
- Model catalog
OCR100%of 2 pts
- Mistral
- Azure AI
- Azure Document Intelligence
- Vertex AI
- Cohere
- Reducto
- AWS Textract
Messages7%of 5 pts
- Anthropic
- Bedrock
- Bedrock Mantle
- Vertex AI
- Azure AI
- DeepSeek
- MiniMax
- GitHub Copilot
- Tencent
- Eden AI
- OpenAI-compatible
Responses0%of 4 pts
- OpenAI
- Azure OpenAI
- Azure AI
- Bedrock
- Bedrock Mantle
- xAI
- OpenRouter
- Databricks
- Fireworks AI
- Perplexity
- GitHub Copilot
- ChatGPT
- vLLM
- Volcengine
- Eden AI
- Manus
- Sail
- LiteLLM Proxy
- OpenAI-compatible
Chat completions0%of 10 pts
- OpenAI
- Azure OpenAI
- Anthropic
- Bedrock
- Vertex AI
- Gemini
- Azure AI
- Mistral
- Cohere
- Groq
- xAI
- DeepSeek
- Together AI
- Fireworks AI
- OpenRouter
- Databricks
- watsonx
- Perplexity
- DeepInfra
- Cerebras
- NVIDIA NIM
- SageMaker
- Hugging Face
- Replicate
- AI21
- SambaNova
- Nebius
- Novita AI
- Hyperbolic
- Baseten
- Moonshot AI
- DashScope
- Volcengine
- MiniMax
- GitHub Copilot
- Snowflake
- Oracle OCI
- Vercel AI Gateway
- LM Studio
- Ollama
- vLLM
- OpenAI-compatible
Adapters0%of 4 pts
- Messages over Chat completions
- Messages over Responses
- Responses over Chat completions
- Chat completions over Responses
Router0%of 6 pts
- Model groups and aliases
- Routing strategies
- Retries
- Fallbacks
- Cooldowns
- TPM and RPM limits
Gateway0%of 8 pts
- Proxy server
- Proxy config and settings
- Master key
- Inference routes
- Pass-through endpoints
- Health checks
Critical-path callbacks45%of 7 pts
- Logging
- Cost tracking
- Request hooks
- Response hooks
Caching18%of 5 pts
- In-memory
- Redis
- Redis semantic
- Valkey semantic
- Qdrant semantic
- S3
- Google Cloud Storage
- Azure Blob Storage
- Disk
Auth and secrets32%of 6 pts
Cloud auth100%
- AWS
- Azure
- Google Cloud
Secret managers62%
- AWS Secrets Manager
- AWS KMS
- Azure Key Vault
- Google Secret Manager
- Google KMS
- HashiCorp Vault
- CyberArk
- Environment variables
- Custom
- Virtual key checks
- JWT auth
- SSO
Non-DB endpoints0%of 6 pts
- MCP gateway
- Admin UI
- Model list and info
- Utility endpoints
Extension points0%of 8 pts
- Guardrails
- Custom proxy hooks
- Policy engine
- Prompt management
Database0%of 15 pts
- Virtual keys
- Teams and users
- Organizations
- Budgets and limits
- Spend logs
- Models stored in DB
- Management endpoints
Observability callbacks0%of 6 pts
- OpenTelemetry
- Langfuse
- Datadog
- Prometheus
- S3 and GCS logging
Perf and benchmarks0%of 2 pts
- Perf improvement
- Benchmark publishing
Test harness and CI0%of 2 pts
- Test harness
- CI updates
Long tail1%of 4 pts
Embeddings0%
- OpenAI
- Azure OpenAI
- Azure AI
- Bedrock
- Vertex AI
- Gemini
- Cohere
- Mistral
- Voyage AI
- Jina AI
- Hugging Face
- SageMaker
- watsonx
- Databricks
- Fireworks AI
- Together AI
- NVIDIA NIM
- Snowflake
- Oracle OCI
- Ollama
- vLLM
- Infinity
- OpenRouter
- OpenAI-compatible
Audio transcription9%
- OpenAI
- Azure OpenAI
- Bedrock
- Deepgram
- ElevenLabs
- Mistral
- xAI
- watsonx
- Soniox
- NVIDIA Riva
- vLLM
Speech and realtime0%
- OpenAI
- Azure OpenAI
- Vertex AI
- Gemini
- ElevenLabs
- xAI
Images0%
- OpenAI
- Azure OpenAI
- Vertex AI
- Gemini
- Bedrock
- xAI
- Recraft
- OpenAI-compatible
Batches and files0%
- OpenAI
- Azure OpenAI
- Anthropic
- Bedrock
- Vertex AI
Rerank0%
- Cohere
- Jina AI
- Voyage AI
- Bedrock
- Together AI
- vLLM
Token counter0%
- Tiktoken
- Hugging Face
Result
The result of the move to Rust
This is where the migration takes us. AIGatewayBench measured four gateways against the same mock server: the Rust gateway, Portkey, Bifrost, and the current Python proxy. The test measured the delay and the memory that each gateway adds.
Added latency at p99
- 0.7 msLiteLLM Rust
- 2.3 msPortkey
- 4.5 msBifrost
- 257.7 msLiteLLM Python v1
Logarithmic scale. A low value is better.
Maximum memory use
- 21.8 MBLiteLLM Rust
- 90.4 MBPortkey
- 199.1 MBBifrost
- 329.5 MBLiteLLM Python v1
A low value is better.
These numbers are the delay the gateway itself adds. Each gateway handled 5000 requests for each endpoint, and p99 is the slowest request in every 100. The AIGatewayBench report gives the full method, the raw data, and the limits of the test.
Engineering updates
How we are getting there
FAQ
Frequently asked questions
How is the percentage calculated?
Each area of work carries a share of 104 points for Major APIs, and within an area its providers or pieces split those points evenly. A piece earns 80% of its share once anyone can turn it on, even as an opt-in, and the last 20% once it runs on Rust by default or the Python path is gone. Shared groundwork, like cloud auth, counts in full once it is done. All APIs reweighs Long tail from 4 to 23 points, for 123 in all.
Major APIs Points Today By Oct 24 Scaffold 4 4 4 OCR 2 2 2 Messages 5 0.4 5 Responses 4 0 3.2 Chat completions 10 0 0 Adapters 4 0 0 Router 6 0 0 Gateway 8 0 0 Critical-path callbacks 7 3.2 3.2 Caching 5 0.9 0.9 Auth and secrets 6 1.9 1.9 Non-DB endpoints 6 0 0 Extension points 8 0 0 Database 15 0 0 Observability callbacks 6 0 0 Perf and benchmarks 2 0 2 Test harness and CI 2 0 2 Long tail 4 0 0 Total 104 12.4 24.2 How does a feature move to Rust?
Each feature starts on Python and moves through these stages one release at a time. For the two middle stages, the
LITELLM_RUSTenvironment variable flips the default for the whole process.Opt-in
Python runs by default. Turn Rust on to try it, with Python as the fallback.
LITELLM_RUST=1Run on RustRust default
Rust runs by default, with Python as the fallback. Turn Rust off to stay on Python.
LITELLM_RUST=0Stay on PythonRust only
Always runs on Rust. The Python path is gone and the switch has no effect.
Done
Shared work like cloud auth has no rollout of its own. It is done once every Rust path can use it.