LiteLLM Proxy
LiteLLM Proxy è un/una app nel catalogo della community osFoundry. Gateway LLM pensato per gli sviluppatori. Un unico endpoint OpenAI-compatibile /chat/completions che traduce verso oltre 100 API di provider (OpenAI, Anthropic, Azure, Bedrock, Vertex, Cohere, Together, Replicate, Ollama, vLLM, ...) con retry automatici, fallback, gestione dei rate limit, rotazione delle chiavi, tracciamento della spesa per chiave virtuale e supporto per OpenAI Realtime API. Il proxy LLM con più stelle su GitHub; approccio SDK-first rispetto a quello UI-first di one-api.
Dettagli
- Workspace: osfoundry
- Categoria: AI
- Prezzo: Free
- Accesso: Community
Funzionalità
- Single OpenAI-compatible endpoint that calls 100+ providers (Anthropic, Bedrock, Vertex, Azure, Ollama, ...)
- Virtual keys with per-key budgets + rate limits + model restrictions + expiry
- Automatic fallbacks — 'use claude-3-5 if gpt-4o is down or over quota' as one-line config
- Spend tracking per-key, per-model, per-team — export to CSV + Prometheus
- OpenAI Realtime API support — voice/audio mode passthrough
- SQLite default — zero infrastructure for solo + small-team use; Postgres optional
Documentazione
La documentazione è mantenuta in inglese dal progetto di origine.
# LiteLLM Proxy
## First-boot
Set `LITELLM_MASTER_KEY` + `LITELLM_SALT_KEY` + `UI_PASSWORD` env. Restart — admin UI lives at `/ui`.
## Add models
Log into `/ui` → **Models** → **+ Add** — each model maps a 'public model name' (what clients see, e.g. `gpt-4o`) to an upstream:
- OpenAI: pick OpenAI, paste key, pick model id
- Anthropic: pick Anthropic, paste key, pick claude-3-5-sonnet-20241022
- Bedrock / Vertex / Azure: paste the provider-specific creds
- Ollama: pick ollama, set api_base to your Ollama URL
## Generate virtual keys
**Keys** tab → **+ Create** — issue per-team or per-app keys with:
- Spend budget (per day / month / total)
- Model restrictions (only certain models accessible)
- Rate limits (RPM, TPM)
- Expiry date
Give the `sk-...` key to your downstream app:
```python
from openai import OpenAI
client = OpenAI(base_url='https://<your-public-url>', api_key='sk-...')
client.chat.completions.create(model='gpt-4o', messages=[...])
```
LiteLLM looks up the model, calls the upstream, tracks spend, enforces budgets.
## Fallbacks + retries
In Model config: set `fallbacks: [{ model: 'gpt-4o', fallbacks: ['claude-3-5-sonnet', 'gemini-1.5-pro'] }]` — if gpt-4o is down or over quota, requests auto-route to Claude, then Gemini.
## Spend tracking
Usage tab shows per-key, per-model, per-team spend in $. Export to CSV / Prometheus. Tags on each request let you slice by user/app/feature.
## Storage
SQLite at `/data/litellm.db` for keys + spend log. For multi-instance scale, switch to Postgres via `DATABASE_URL` env.
Come utilizzare LiteLLM Proxy in osFoundry
Installi LiteLLM Proxy nel suo workspace con un clic, quindi ne esegua il fork in osStudio per personalizzare i prompt, gli strumenti o la configurazione per il suo stack. Chiunque nel suo workspace potrà riprendere il lavoro dove l'ha lasciato.
Altri app dalla community
- CRM — Gestione delle relazioni con i clienti con contatti, trattative e tracciamento della pipeline.
- Kanban Board — Una board kanban e di progetto in stile Trello con card, board, viste calendario e tabella, e proprietà per board. Basata su Focalboard (server personale standalone). SQLite integrato su un volume persistente.
- Helpdesk — Smistamento ticket e inbox di assistenza clienti con tracciamento SLA.
- Page Builder — Page builder visuale drag-and-drop con sezioni, temi, SEO e pubblicazione
- Website Builder — Website builder multi-pagina con raccolte CMS, navigazione globale, footer, temi e pubblicazione
- Vetrina E-commerce — Vetrina e-commerce con catalogo prodotti, carrello e checkout.