LiteLLM Proxy
LiteLLM Proxy est un(e) app du catalogue communautaire osFoundry. Passerelle LLM orientée développeurs. Endpoint unique compatible OpenAI /chat/completions qui se traduit vers plus de 100 API de fournisseurs (OpenAI, Anthropic, Azure, Bedrock, Vertex, Cohere, Together, Replicate, Ollama, vLLM, etc.) avec retries automatiques, bascules, gestion de la limitation de débit, rotation des clés, suivi des dépenses par clé virtuelle et support de l'API OpenAI Realtime. Le proxy LLM le plus étoilé sur GitHub ; approche SDK-first par opposition à l'approche UI-first de one-api.
Détails
- Espace de travail: osfoundry
- Catégorie: AI
- Tarif: Free
- Accès: Community
Fonctionnalités
- 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
Documentation
La documentation est maintenue en anglais par le projet d'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.
Comment utiliser LiteLLM Proxy dans osFoundry
Installez LiteLLM Proxy dans votre workspace en un clic, puis forkez-le dans osStudio pour personnaliser les prompts, les outils ou la configuration selon votre stack. Toute personne de votre workspace peut reprendre là où vous vous êtes arrêté.
Autres apps de la communauté
- CRM — Gestion de la relation client avec contacts, opportunités et suivi de pipeline.
- Kanban Board — Un tableau Kanban et de projet de type Trello avec cartes, tableaux, vues calendrier et tableau, et propriétés par tableau. Propulsé par Focalboard (serveur personnel autonome). SQLite intégré sur un volume persistant.
- Helpdesk — Tri de tickets et boîte de réception du support client avec suivi des SLA.
- Page Builder — Constructeur de pages visuel glisser-déposer avec sections, thèmes, SEO et publication
- Website Builder — Constructeur de site web multi-page avec collections CMS, navigation globale, footer, thèmes et publication
- Boutique en ligne — Boutique e-commerce avec catalogue produits, panier et paiement.