Skip to main content

Configuration File Structure

The proxy configuration file (config.yaml) has four main sections:

Model List

Define your model deployments:

Provider Examples

Environment Variables

Load API keys from environment:
Or directly (not recommended for production):
Never commit API keys to version control. Always use environment variables.

Rate Limits

Set per-deployment rate limits:

Timeouts

LiteLLM Settings

Configure LiteLLM behavior:

Callbacks

Supported callback integrations:
  • prometheus - Metrics export
  • langfuse - Observability
  • lunary - Monitoring
  • helicone - Analytics
  • slack - Alerting
  • webhook - Custom webhooks
  • s3 - Log to S3

Caching

Budget Configuration

Router Settings

Configure load balancing and routing:

Routing Strategies

General Settings

Proxy server configuration:

Pass-Through Endpoints

Define custom pass-through endpoints:

Master Key

The master key provides admin access:
Or from environment:
The master key grants full access to the proxy. Keep it secure and rotate regularly.

Advanced Configuration

Fine-Tuning Settings

For /fine_tuning/jobs endpoints:

Files Settings

For /files endpoints:

Wildcard Routing

Route any model name to a provider:

Multiple Deployments

Load balance across multiple deployments:

Configuration Validation

Validate your configuration:

Environment Variables

Key environment variables:

Best Practices

  1. Security
    • Use environment variables for all secrets
    • Rotate master keys regularly
    • Use strong, unique passwords
  2. Reliability
    • Configure multiple deployments for critical models
    • Enable health checks
    • Set appropriate timeouts
  3. Performance
    • Use Redis for caching and shared state
    • Enable connection pooling
    • Configure rate limits
  4. Monitoring
    • Enable Prometheus metrics
    • Configure logging callbacks
    • Set up alerts for failures

Next Steps

Virtual Keys

Learn about API key management

Budget Alerts

Set up spending alerts

Docker Deployment

Deploy in production

Quick Start

Get started guide