LiteLLM is an open-source AI gateway that proxies all LLM requests through a single endpoint, providing unified monitoring, access control, and cost tracking across providers like OpenAI and Anthropic. The post walks through running LiteLLM locally with Docker and PostgreSQL, configuring it via YAML, writing a demo Python client, integrating OpenTelemetry traces with VictoriaTraces, and exploring access management features including teams, users, API keys, budgets, and rate limits. Key span attributes for cost, token usage, model info, and user identity are highlighted. The author notes that while the monitoring and tracing capabilities are impressive, user management has some confusing behaviors — particularly around keys created outside a team bypassing team-level rate limits.

24m read timeFrom itnext.io
Post cover image
Table of contents
ContentsLiteLLM — main featuresWhy do we need this?Running LiteLLM with DockerConfig.yaml — LiteLLM configurationDemo Python App — AI ClientMonitoring, OpenTelemetry and TracesOpenTelemetry and VictoriaTracesGet Arseny Zinchenko (setevoy)’s stories in your inboxLiteLLM Span AttributesAccess ManagementAuthentication and accessTeams and UsersBudgets and limitsRBAC and System RolesCreating a TeamCreating a User in the Web UITeam PermissionsCreating a User API Key for a Team in the Web UICreating a User API Key in the Web UI without a Team and without LimitsCreating a User and API Key via the LiteLLM API with a Rate LimitInstead of conclusions
172 Impressions