api-ai-litellm
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production deployment
npx skills add majiayu000/claude-skill-registry --skill api-ai-litellm --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# LiteLLM Proxy Patterns > **Quick Guide:** LiteLLM is an OpenAI-compatible proxy (AI gateway) that routes requests to 100+ LLM providers. TypeScript clients connect via the standard OpenAI SDK with `baseURL` pointed at the proxy. Configure models, fallbacks, load balancing, and budgets in `config.yaml`. Use `provider/model-name` format in `litellm_params.model` (e.g., `anthropic/claude-sonnet-4-20250514`). The `model_name` in config is the user-facing alias clients request. Virtual keys require PostgreSQL. Master key must start with `sk-`. --- <critical_requirements> ## CRITICAL: Before Using This Skill > **All code must follow project conventions in CLAUDE.md** (kebab-case, named exports, import ordering, `import type`, named constants) **(You MUST use the `provider/model-name` format in `litellm_params.model` -- e.g., `anthropic/claude-sonnet-4-20250514`, `openai/gpt-4o`, `azure/my-deployment` -- the provider prefix is how LiteLLM routes to the correct API)** **(You MUST set `model_name` as the user-facing alias that clients request -- this is NOT the provider model ID, it is the name your TypeScript client passes as `model`)** **(You MUST point the OpenAI SDK `baseURL` at the p
- CRITICAL: Before Using This Skill
- Examples Index
- Philosophy
- Core Patterns
- Pattern 1: Minimal config.yaml
- Pattern 2: TypeScript Client via OpenAI SDK
- Pattern 3: Fallback Chains
- Pattern 4: Load Balancing Across Deployments
- Pattern 5: Virtual Keys with Budgets
- Pattern 6: Spend Tracking with Tags
- Decision Framework
- Do You Need a Proxy?
- Which Routing Strategy?
- Virtual Keys vs Master Key Only
Generate a virtual key via API curl 'http://localhost:4000/key/generate' \
What does the api-ai-litellm skill do?
LiteLLM proxy server setup, TypeScript client patterns via OpenAI SDK, model routing, fallbacks, load balancing, spend tracking, virtual keys, and production deployment
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-ai-litellm --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
