- Custom providers: AWS Bedrock, Azure OpenAI, Ollama, or 100+ other providers
- Cost control: Use your own API keys and budgets
- Observability: Track usage with Langfuse
- Network isolation: Keep LLM traffic in your infrastructure
- Offline operation: Run local models (Ollama) with no internet
How It Works
The CLI starts a local LiteLLM proxy process that intercepts all LLM requests from the worker:- CLI starts proxy on
127.0.0.1:<auto-port> - Worker environment gets
LITELLM_API_BASEpointing to local proxy - All LLM requests go through your local proxy instead of Control Plane
- Proxy forwards to your configured provider (AWS/Azure/Ollama/etc.)
Supported Providers
LiteLLM supports 100+ providers. Most commonly used: Cloud Providers:- AWS Bedrock (Claude, Llama, Mistral)
- Azure OpenAI (GPT-4, GPT-3.5)
- GCP Vertex AI (Gemini, PaLM)
- OpenAI, Anthropic, Cohere, Mistral AI
- Ollama (Llama, Mistral, CodeLlama)
- vLLM, LocalAI, LM Studio
- Hugging Face TGI
Configuration Methods
You can configure the custom LLM gateway in 4 ways (in priority order):1. CLI Flags (Highest Priority)
Override everything with command-line flags:- Config File
- Inline JSON
2. Environment Variables
Set once, use everywhere:3. Context Configuration
Persistent configuration in~/.kubiya/config - just add litellm-proxy to your current context:
4. Control Plane Queue Settings
Configure via Composer UI for shared team configuration.5. Control Plane Gateway (Default Fallback)
If nothing is configured, workers use the centralized Control Plane gateway.Provider Configuration Examples
AWS Bedrock (Claude)
- Configuration File
- Start Worker
- IAM Roles
Create
litellm_bedrock.yaml:AWS Bedrock Authentication: Supports IAM roles, access keys, session tokens, profiles, and more. See AWS Bedrock Provider Docs for all auth methods.
Ollama (Local Models)
Run completely offline with open-source models:- Configuration File
- Setup Ollama
- Remote Ollama
Create
litellm_ollama.json:Ollama Benefits: Perfect for development, privacy-sensitive workloads, air-gapped environments, or cost-free experimentation. See Ollama Provider Docs.
Azure OpenAI
- Configuration File
- Start Worker
- Multiple Deployments
Create
litellm_azure.yaml:Multi-Provider (Fallback & Load Balancing)
Configure multiple providers for reliability and cost optimization:LiteLLM Configuration Reference
Model List Structure
Each model inmodel_list requires:
string
required
User-facing model name used in requests (e.g., “gpt-4”, “claude-3-opus”)
object
required
Parameters passed to LiteLLM:
model: Provider-specific model identifier (e.g., “azure/gpt-4”, “bedrock/claude-3-opus”)api_key: API key (useos.environ/VAR_NAMEfor environment variables)api_base: API endpoint URL (for Azure, self-hosted, etc.)- Provider-specific params (region, version, etc.)
LiteLLM Settings
object
Global settings for the proxy:
success_callback: List of callbacks on success (e.g.,["langfuse"])failure_callback: List of callbacks on failuredrop_params: Drop extra params not supported by providernum_retries: Number of retry attempts on failuretimeout: Request timeout in seconds
Environment Variables
object
Environment variables for the proxy process (API keys, Langfuse config, etc.)
Complete Schema Example
Observability with Langfuse
Track LLM usage, costs, and performance by adding Langfuse to your config:- Token usage and cost per model
- Request latency and success rates
- Error tracking
- Per-user analytics
Advanced Features
Rate Limiting
Caching
Load Balancing
Custom Metadata
Troubleshooting
Proxy Won’t Start
Worker Not Using Local Proxy
Authentication Errors
Model Not Found
Performance Issues
Best Practices
Security:- Use environment variables for API keys (never hardcode)
- Restrict file permissions:
chmod 600 ~/.kubiya/litellm_*.yaml - Rotate credentials regularly
- Use IAM roles when possible (AWS Bedrock on EC2/ECS)
- Use cheaper models for simple tasks
- Enable caching to avoid duplicate requests
- Set rate limits to prevent runaway costs
- Monitor usage with Langfuse
- Configure fallback models across providers
- Set appropriate timeouts
- Enable retries for transient failures
- Monitor proxy logs
- Start with Ollama for local dev (free, fast)
- Test with staging before production
- Enable Langfuse early
- Use context configuration for environment switching
Examples by Use Case
Development Environment (Local Ollama)
Quick setup for local development:Staging Environment (Azure OpenAI)
Create separate config file for staging:Production Environment (AWS Bedrock)
Production setup with Langfuse observability:Related Documentation
- Configuration File - Persistent LLM gateway config
- Environment Variables - LiteLLM proxy env vars
- Worker Management - Deploy workers
- LiteLLM Providers - All 100+ providers
- AWS Bedrock - Bedrock setup
- Ollama - Local models