diff --git a/blueprints/litellm/docker-compose.yml b/blueprints/litellm/docker-compose.yml new file mode 100644 index 00000000..103d53be --- /dev/null +++ b/blueprints/litellm/docker-compose.yml @@ -0,0 +1,53 @@ +version: "3.8" + +services: + litellm: + image: ghcr.io/berriai/litellm:main-latest + restart: unless-stopped + depends_on: + litellm-db: + condition: service_healthy + environment: + DATABASE_URL: ${DATABASE_URL} + LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY} + UI_USERNAME: ${UI_USERNAME} + UI_PASSWORD: ${UI_PASSWORD} + STORE_MODEL_IN_DB: "True" + + # Provider Keys + OPENAI_API_KEY: ${OPENAI_API_KEY} + OPENAI_BASE_URL: ${OPENAI_BASE_URL} + COHERE_API_KEY: ${COHERE_API_KEY} + OR_SITE_URL: ${OR_SITE_URL} + OR_APP_NAME: ${OR_APP_NAME} + OR_API_KEY: ${OR_API_KEY} + AZURE_API_BASE: ${AZURE_API_BASE} + AZURE_API_VERSION: ${AZURE_API_VERSION} + AZURE_API_KEY: ${AZURE_API_KEY} + REPLICATE_API_KEY: ${REPLICATE_API_KEY} + REPLICATE_API_TOKEN: ${REPLICATE_API_TOKEN} + ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY} + INFISICAL_TOKEN: ${INFISICAL_TOKEN} + NOVITA_API_KEY: ${NOVITA_API_KEY} + INFINITY_API_KEY: ${INFINITY_API_KEY} + + expose: + - 4000 + + litellm-db: + image: postgres:16-alpine + restart: on-failure:5 + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] + interval: 5s + timeout: 5s + retries: 5 + volumes: + - litellm-db:/var/lib/postgresql/data + environment: + POSTGRES_DB: ${POSTGRES_DB} + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} + +volumes: + litellm-db: {} diff --git a/blueprints/litellm/image.png b/blueprints/litellm/image.png new file mode 100644 index 00000000..d0a01f96 Binary files /dev/null and b/blueprints/litellm/image.png differ diff --git a/blueprints/litellm/template.toml b/blueprints/litellm/template.toml new file mode 100644 index 00000000..1e21dc72 --- /dev/null +++ b/blueprints/litellm/template.toml @@ -0,0 +1,67 @@ +[variables] +main_domain = "${domain}" + +# Database +postgres_db = "litellm" +postgres_user = "litellm" +postgres_password = "${password:32}" + +# LiteLLM UI + Master Key +ui_username = "${username}" +ui_password = "${password:32}" +litellm_master_key = "${password:64}" + +# Provider API Keys (empty by default) +openai_api_key = "" +openai_base_url = "" +cohere_api_key = "" +or_site_url = "" +or_app_name = "LiteLLM Example app" +or_api_key = "" +azure_api_base = "" +azure_api_version = "" +azure_api_key = "" +replicate_api_key = "" +replicate_api_token = "" +anthropic_api_key = "" +infisical_token = "" +novita_api_key = "" +infinity_api_key = "" + +[config] +[[config.domains]] +serviceName = "litellm" +port = 4000 +host = "${main_domain}" + +[config.env] +# Database +DATABASE_URL = "postgresql://${postgres_user}:${postgres_password}@litellm-db:5432/${postgres_db}" +POSTGRES_DB = "${postgres_db}" +POSTGRES_USER = "${postgres_user}" +POSTGRES_PASSWORD = "${postgres_password}" + +# LiteLLM +UI_USERNAME = "${ui_username}" +UI_PASSWORD = "${ui_password}" +LITELLM_MASTER_KEY = "${litellm_master_key}" +STORE_MODEL_IN_DB = "True" + +# Providers +OPENAI_API_KEY = "${openai_api_key}" +OPENAI_BASE_URL = "${openai_base_url}" +COHERE_API_KEY = "${cohere_api_key}" +OR_SITE_URL = "${or_site_url}" +OR_APP_NAME = "${or_app_name}" +OR_API_KEY = "${or_api_key}" +AZURE_API_BASE = "${azure_api_base}" +AZURE_API_VERSION = "${azure_api_version}" +AZURE_API_KEY = "${azure_api_key}" +REPLICATE_API_KEY = "${replicate_api_key}" +REPLICATE_API_TOKEN = "${replicate_api_token}" +ANTHROPIC_API_KEY = "${anthropic_api_key}" +INFISICAL_TOKEN = "${infisical_token}" +NOVITA_API_KEY = "${novita_api_key}" +INFINITY_API_KEY = "${infinity_api_key}" + +[[config.mounts]] diff --git a/meta.json b/meta.json index ff86accf..18473f89 100644 --- a/meta.json +++ b/meta.json @@ -2548,6 +2548,25 @@ "mailing-list" ] }, + { + "id": "litellm", + "name": "LiteLLM", + "version": "main-stable", + "description": "LiteLLM is a lightweight OpenAI API-compatible proxy for managing multiple LLM providers with a single endpoint.", + "logo": "image.png", + "links": { + "github": "https://github.com/BerriAI/litellm", + "website": "https://docs.litellm.ai", + "docs": "https://docs.litellm.ai/docs/proxy/quick_start" + }, + "tags": [ + "ai", + "proxy", + "llm", + "openai-compatible", + "monitoring" + ] + }, { "id": "livekit", "name": "Livekit",