mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-13 03:59:12 +00:00
* feat(lens): isolate trace storage and investigation in a Rust service
* fix(lens): include Rust sources in the image build context
* feat(lens): wire service setup, scoped delivery receipts and lease attempts
* fix(lens): complete service routing and reject stale investigation results
* fix(lens): retry key propagation and validate isolated Compose setup
* fix(lens): seed through isolated ingestion and preserve upstream queue fixes
* chore: sync schema.prisma copies from root
* fix(lens): bind nullable due timestamps as text for Prisma
* chore(ui): remove stale lint suppressions
* fix(lens): address CI failures and review findings
* refactor(lens): remove retired Python worker and run evaluations in Rust
* fix(lens): reuse control connections and satisfy review checks
* test(lens): install and upgrade both Helm charts on Kubernetes
* test(lens): run connection reuse coverage as an integration test
* fix(ui): upgrade Next.js to 16.3.8 security release
* fix(lens): fence stale attempts and preserve reviewed evidence
* Revert "fix(ui): upgrade Next.js to 16.3.8 security release"
This reverts commit 2f79a51b25.
* fix(lens): stop failed investigations and stream history excerpts
* test(lens): cover model tool and result contracts
* test(lens): fix retired routes and reuse installation build artifacts
* test(lens): use portable grep in Helm installation smoke
* test(lens): wait for migrations before forwarding Helm services
* fix(lens): keep failed evidence reads retryable
* fix(lens): preserve sandbox output during process exit
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
100 lines
3.3 KiB
YAML
100 lines
3.3 KiB
YAML
name: litellm-lens
|
|
|
|
services:
|
|
litellm:
|
|
image: ghcr.io/berriai/litellm:${LITELLM_VERSION:?Set LITELLM_VERSION to a published release, without the v prefix}
|
|
entrypoint:
|
|
- python3
|
|
- -c
|
|
- |
|
|
import os, sys
|
|
from urllib.parse import quote
|
|
postgres_password = quote(os.environ["POSTGRES_PASSWORD"], safe="")
|
|
os.environ["DATABASE_URL"] = f"postgresql://litellm:{postgres_password}@db:5432/litellm"
|
|
os.execv("docker/prod_entrypoint.sh", ["docker/prod_entrypoint.sh", *sys.argv[1:]])
|
|
command: ["--config", "/app/lens-config.yaml", "--port", "4000"]
|
|
environment:
|
|
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY:?Set a strong master key}
|
|
LITELLM_SALT_KEY: ${LITELLM_SALT_KEY:?Set a permanent encryption key and keep it across upgrades}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set a permanent database password}
|
|
STORE_MODEL_IN_DB: "True"
|
|
LITELLM_LENS_URL: http://lens-worker:4318
|
|
LITELLM_LENS_PUBLIC_URL: ${LITELLM_LENS_PUBLIC_URL:-http://localhost:4318}
|
|
LITELLM_LENS_SERVICE_TOKEN: ${LITELLM_LENS_SERVICE_TOKEN:?Set the shared Lens service secret}
|
|
LENS_WORKER_IMAGE: ghcr.io/berriai/litellm-lens-worker:v${LITELLM_VERSION}
|
|
volumes:
|
|
- ./config.yaml:/app/lens-config.yaml:ro
|
|
ports:
|
|
- "127.0.0.1:${LITELLM_PORT:-4000}:4000"
|
|
networks: [proxy, database]
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
lens-worker:
|
|
image: ghcr.io/berriai/litellm-lens-worker:v${LITELLM_VERSION}
|
|
environment:
|
|
LITELLM_URL: http://litellm:4000
|
|
LENS_WORKER_TOKEN: ${LENS_WORKER_TOKEN:-}
|
|
LITELLM_LENS_SERVICE_TOKEN: ${LITELLM_LENS_SERVICE_TOKEN}
|
|
CLICKHOUSE_HOST: clickhouse
|
|
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD:?Set a permanent ClickHouse password}
|
|
CLICKHOUSE_DATABASE: ${CLICKHOUSE_DATABASE:-litellm}
|
|
AGENT_TRACING_RETENTION_DAYS: ${AGENT_TRACING_RETENTION_DAYS:-14}
|
|
depends_on: [litellm]
|
|
networks: [proxy, storage]
|
|
ports:
|
|
- "127.0.0.1:${LENS_PORT:-4318}:4318"
|
|
mem_limit: 2g
|
|
cpus: 2
|
|
pids_limit: 64
|
|
restart: unless-stopped
|
|
read_only: true
|
|
tmpfs:
|
|
- /tmp:rw,noexec,nosuid,size=${LENS_WORKER_TMP_SIZE:-1g}
|
|
cap_drop: [ALL]
|
|
security_opt: [no-new-privileges:true]
|
|
|
|
db:
|
|
image: postgres:16
|
|
environment:
|
|
POSTGRES_DB: litellm
|
|
POSTGRES_USER: litellm
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
networks: [database]
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U litellm -d litellm"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
restart: unless-stopped
|
|
|
|
clickhouse:
|
|
image: clickhouse/clickhouse-server:26.9.6.6
|
|
environment:
|
|
CLICKHOUSE_USER: default
|
|
CLICKHOUSE_PASSWORD: ${CLICKHOUSE_PASSWORD}
|
|
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: "1"
|
|
volumes:
|
|
- clickhouse_data:/var/lib/clickhouse
|
|
healthcheck:
|
|
test: ["CMD", "clickhouse-client", "--user", "default", "--password", "${CLICKHOUSE_PASSWORD}", "--query", "SELECT 1"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
restart: unless-stopped
|
|
networks: [storage]
|
|
|
|
networks:
|
|
proxy:
|
|
database:
|
|
internal: true
|
|
storage:
|
|
internal: true
|
|
|
|
volumes:
|
|
postgres_data:
|
|
clickhouse_data:
|