LiteLLM
LiteLLM is an open-source LLM gateway that provides a unified API to 100+ model providers. Route 龙虾AI through LiteLLM to get centralized cost tracking, logging, and the flexibility to switch backends without changing your 龙虾AI config.Why use LiteLLM with 龙虾AI?
- Cost tracking — See exactly what 龙虾AI spends across all models
- Model routing — Switch between Claude, GPT-4, Gemini, Bedrock without config changes
- Virtual keys — Create keys with spend limits for 龙虾AI
- Logging — Full request/response logs for debugging
- Fallbacks — Automatic failover if your primary provider is down
Quick start
Via onboarding
Manual setup
- Start LiteLLM Proxy:
- Point 龙虾AI to LiteLLM:
Configuration
Environment variables
Config file
Virtual keys
Create a dedicated key for 龙虾AI with spend limits:LITELLM_API_KEY.
Model routing
LiteLLM can route model requests to different backends. Configure in your LiteLLMconfig.yaml:
claude-opus-4-6 — LiteLLM handles the routing.
Viewing usage
Check LiteLLM’s dashboard or API:Notes
- LiteLLM runs on
http://localhost:4000by default - 龙虾AI connects via the OpenAI-compatible
/v1/chat/completionsendpoint - All 龙虾AI features work through LiteLLM — no limitations