LiteLLM or another LLM proxy #170

Open
opened 2025-06-28 01:53:44 +03:00 by skobkin · 1 comment
Owner
  • LiteLLM
  • One API is a good alternative.
- LiteLLM - [One API](https://github.com/songquanpeng/one-api/blob/main/README.en.md) is a good alternative.
skobkin self-assigned this 2025-06-28 01:53:44 +03:00
Author
Owner
Feature LiteLLM Proxy One API (songquanpeng/one-api)
Primary purpose AI Gateway / OpenAI-compatible proxy for many providers, with cost tracking + routing features. (GitHub) OpenAI-compatible “API management & redistribution” gateway with UI, tokens, channels, quotas/billing. (pkg.go.dev)
Docker deploy Official Docker deployment paths and images; includes a dedicated “database” image for DB-backed mode. (LiteLLM) Official Docker image (justsong/one-api) and docker-compose examples. (GitHub)
DB requirement Optional overall; but DB-backed features (“Virtual Keys”, spend tracking, etc.) require PostgreSQL via DATABASE_URL. (LiteLLM) Can run with SQLite (default/quick) or MySQL via SQL_DSN; docs warn that higher concurrency “must set SQL_DSN” (i.e., use MySQL). (GitHub)
SQLite support (not supported for the proxy’s DB-backed features; Postgres is the documented requirement). (LiteLLM) (explicit “use SQLite” Docker instructions; docker-compose.yml comment says you can comment SQL_DSN to use SQLite). (GitHub)
Key management / multi-tenant tokens “Virtual Keys” (admin master key → generate keys). (LiteLLM) Token management (expiry, quota, IP allowlist, model allowlist) + user management flows. (pkg.go.dev)
Quotas / budgets Budget limits via Virtual Keys (DB mode). (LiteLLM) Quota system + quota details + group multipliers. (pkg.go.dev)
Cost / usage tracking Explicit “Track Spend” positioning in DB-backed deployment; also “cost tracking” called out in project overview. (LiteLLM) Quota + billing system with usage tracking / cost calculations across providers/models (as described in project docs). (DeepWiki)
Provider aggregation “Call 100+ LLM APIs” (gateway/SDK). (GitHub) Many providers listed (OpenAI/Azure, Claude, Gemini, DeepSeek, Ollama, etc.), plus “third-party proxy services”. (pkg.go.dev)
Load balancing / routing Load balancing is a first-class feature. (GitHub) Supports load balancing across channels. (pkg.go.dev)
Streaming Supported (proxy supports typical OpenAI streaming usage; generally used with OpenAI SDKs). (LiteLLM) Explicitly supports stream mode. (pkg.go.dev)
OpenAI-client compatibility Designed to be used with OpenAI SDKs; docs show using OpenAI Python client against the proxy base URL. (LiteLLM) “Access all models via standard OpenAI API format”; intended for OpenAI-compatible clients by setting API Base + Key. (pkg.go.dev)
UI / admin panel Has an admin/UI story (esp. in DB-backed/key-management mode). (GitHub) Built-in web admin UI; repo describes “English UI”. (GitHub)
Notable operational caveat If you want key management/spend tracking, you’re signing up for Postgres (and usually more “gateway” ops). (LiteLLM) SQLite is fine for simple/small setups, but docs strongly recommend MySQL (SQL_DSN) for higher concurrency. (GitHub)
| Feature | LiteLLM Proxy | One API (songquanpeng/one-api) | | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | Primary purpose | AI Gateway / OpenAI-compatible proxy for many providers, with cost tracking + routing features. ([GitHub][1]) | OpenAI-compatible “API management & redistribution” gateway with UI, tokens, channels, quotas/billing. ([pkg.go.dev][2]) | | Docker deploy | Official Docker deployment paths and images; includes a dedicated “database” image for DB-backed mode. ([LiteLLM][3]) | Official Docker image (`justsong/one-api`) and docker-compose examples. ([GitHub][4]) | | DB requirement | **Optional** overall; but DB-backed features (“Virtual Keys”, spend tracking, etc.) require **PostgreSQL via `DATABASE_URL`**. ([LiteLLM][3]) | Can run with **SQLite** (default/quick) or **MySQL** via `SQL_DSN`; docs warn that higher concurrency “must set `SQL_DSN`” (i.e., use MySQL). ([GitHub][4]) | | SQLite support | ❌ (not supported for the proxy’s DB-backed features; Postgres is the documented requirement). ([LiteLLM][3]) | ✅ (explicit “use SQLite” Docker instructions; `docker-compose.yml` comment says you can comment `SQL_DSN` to use SQLite). ([GitHub][4]) | | Key management / multi-tenant tokens | “Virtual Keys” (admin master key → generate keys). ([LiteLLM][5]) | Token management (expiry, quota, IP allowlist, model allowlist) + user management flows. ([pkg.go.dev][2]) | | Quotas / budgets | Budget limits via Virtual Keys (DB mode). ([LiteLLM][5]) | Quota system + quota details + group multipliers. ([pkg.go.dev][2]) | | Cost / usage tracking | Explicit “Track Spend” positioning in DB-backed deployment; also “cost tracking” called out in project overview. ([LiteLLM][3]) | Quota + billing system with usage tracking / cost calculations across providers/models (as described in project docs). ([DeepWiki][6]) | | Provider aggregation | “Call 100+ LLM APIs” (gateway/SDK). ([GitHub][1]) | Many providers listed (OpenAI/Azure, Claude, Gemini, DeepSeek, Ollama, etc.), plus “third-party proxy services”. ([pkg.go.dev][2]) | | Load balancing / routing | Load balancing is a first-class feature. ([GitHub][1]) | Supports load balancing across channels. ([pkg.go.dev][2]) | | Streaming | Supported (proxy supports typical OpenAI streaming usage; generally used with OpenAI SDKs). ([LiteLLM][3]) | Explicitly supports stream mode. ([pkg.go.dev][2]) | | OpenAI-client compatibility | Designed to be used with OpenAI SDKs; docs show using OpenAI Python client against the proxy base URL. ([LiteLLM][7]) | “Access all models via standard OpenAI API format”; intended for OpenAI-compatible clients by setting API Base + Key. ([pkg.go.dev][2]) | | UI / admin panel | Has an admin/UI story (esp. in DB-backed/key-management mode). ([GitHub][8]) | Built-in web admin UI; repo describes “English UI”. ([GitHub][9]) | | Notable operational caveat | If you want key management/spend tracking, you’re signing up for Postgres (and usually more “gateway” ops). ([LiteLLM][3]) | SQLite is fine for simple/small setups, but docs strongly recommend MySQL (`SQL_DSN`) for higher concurrency. ([GitHub][4]) | [1]: https://github.com/BerriAI/litellm?utm_source=chatgpt.com "GitHub - BerriAI/litellm: Python SDK, Proxy Server (AI Gateway) to call ..." [2]: https://pkg.go.dev/github.com/songquanpeng/one-api?utm_source=chatgpt.com "one-api command - github.com/songquanpeng/one-api - Go Packages" [3]: https://docs.litellm.ai/docs/proxy/deploy?utm_source=chatgpt.com "Docker, Helm, Terraform | liteLLM" [4]: https://github.com/songquanpeng/one-api/blob/main/README.md?plain=1&utm_source=chatgpt.com "one-api/README.md at main · songquanpeng/one-api · GitHub" [5]: https://docs.litellm.ai/docs/proxy/virtual_keys?utm_source=chatgpt.com "Virtual Keys - liteLLM" [6]: https://deepwiki.com/songquanpeng/one-api/3.4-quota-and-billing?utm_source=chatgpt.com "Quota and Billing | songquanpeng/one-api | DeepWiki" [7]: https://docs.litellm.ai/docs/providers/openai_compatible?utm_source=chatgpt.com "OpenAI-Compatible Endpoints | liteLLM" [8]: https://github.com/BerriAI/litellm/blob/main/docs/my-website/docs/proxy/virtual_keys.md?utm_source=chatgpt.com "litellm/docs/my-website/docs/proxy/virtual_keys.md at main - GitHub" [9]: https://github.com/songquanpeng/one-api?utm_source=chatgpt.com "GitHub - songquanpeng/one-api: LLM API 管理 & 分发系统,支持 OpenAI、Azure ..."
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
skobkin/docker-stacks#170
No description provided.