litellm-production

Configure LiteLLM with connection pooling, caching, and OpenTelemetry tracing.

1|Updated Jun 4, 2026
One-click install
npx skills add https://github.com/hung-phan/ml-skills --skill litellm-production
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: litellm-production
Source: https://github.com/hung-phan/ml-skills/tree/main/skills/ml-review/references/ml-libraries/litellm/production
Command: npx skills add https://github.com/hung-phan/ml-skills --skill litellm-production

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires aiohttp, litellm, opentelemetry, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the common production issues of LiteLLM, such as TCP churn, file-descriptor exhaustion, high latency, and cost overruns, by implementing a shared aiohttp session for connection pooling, OTel tracing, and Redis/disk cache tiering.

Core Features & Use Cases

  • Connection Pooling: Reduces TCP churn and file-descriptor exhaustion.
  • Response Caching: Improves latency and reduces cost by caching LLM responses.
  • OTel Tracing: Enables detailed monitoring of LLM calls.
  • Use Case: Deploy a service that makes high-throughput LLM calls, integrate LiteLLM into a FastAPI app, or configure LLM response caching for production services.

Quick Start

Initialize litellm with the production configuration to enable connection pooling, caching, and OTel tracing.

Frequently Asked Questions about litellm-production

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix TCP churn and file-descriptor exhaustion when making high-throughput LiteLLM calls?

To fix TCP churn and file-descriptor exhaustion in LiteLLM, implement a shared aiohttp session for connection pooling. This manages connections efficiently to prevent resource exhaustion during high-throughput LLM calls.

How do I configure LiteLLM response caching for production services?

Configure LiteLLM response caching by implementing Redis and disk cache tiering. This improves latency and reduces cost by serving cached LLM responses for repeated production service requests.

Can I use OpenTelemetry tracing to monitor LiteLLM calls in production?

Yes, you can use OpenTelemetry tracing to monitor LiteLLM calls in production. OTel tracing enables detailed monitoring of LLM calls to track performance and diagnose issues across your service.

What's the best way to integrate LiteLLM into a FastAPI app for high-throughput LLM calls?

The best way to integrate LiteLLM into a FastAPI app for high-throughput LLM calls is by configuring a shared aiohttp session, response caching, and OpenTelemetry tracing to optimize performance and cost.

Do I need aiohttp and OpenTelemetry to optimize LiteLLM for production?

Yes, you need aiohttp, litellm, and OpenTelemetry to optimize production-scale LiteLLM. These dependencies are required for connection management, response caching, and detailed monitoring of LLM calls.