Commit graph

2 commits

Author SHA1 Message Date
56b0e95790 feat: enhance LiteLLM proxy configuration and deployment setup
Configuration updates to the Aido deployment stack, focusing on LiteLLM proxy hardening, improved model configuration, and enhanced environment setup.
2026-08-14 23:18:57 +02:00
livdebus
7a618d4a74 feat: production hardening with LiteLLM proxy integration and security updates
## Overview
Major production readiness update integrating LiteLLM proxy for AI model
management, security hardening, and infrastructure simplification.

## Changes

### 🔐 Security & Secrets Management
- Auto-generate secrets via `openssl rand -hex` for:
  - `USER_AUTH_SECRET`, `ENCRYPTION_KEY_SECRET`, `METRICS_AUTH_TOKEN`
  - `POSTGRES_PASSWORD`, `LITELLM_*` credentials
- Set `DISABLE_TELEMETRY=true` for data sovereignty compliance
- Changed `POSTGRES_USER` from `postgres` → `onyx-admin`
- Set `TRACK_EXTERNAL_IDP_EXPIRY=true`

### 🤖 LiteLLM Proxy Integration
- **New service**: `litellm-proxy` with dedicated Postgres + Redis
- **New config**: `litellm-config.yaml` with 3 Swiss-hosted models:
  - `LivQwen` (Qwen3.5-397B-A17B-FP8)
  - `LivKimi` (Kimi-K2.6)
  - `LivGemma` (NVIDIA Nemotron-3-Nano-30B-A3B-FP8)
- Model fallback routing: LivQwen ↔ LivKimi ↔ LivGemma
- Caching enabled via Redis with 3600s TTL
- Custom error message mappings for user-friendly responses

### 🏗️ Infrastructure Updates
- Switched from local builds → official Onyx Docker images
  - Removed `build.context` for api_server, background, inference/indexing servers
- Increased NGINX timeouts: 300s → 600s (for complex AI queries)
- Added PostgreSQL connection pooling & keepalive settings
- S3 credentials now fully environment-driven (no hardcoded values)
- Added `S3_REGION` variable
- Removed certbot service (SSL handled externally)

### ⚙️ Configuration
- `COMPOSE_PROFILES=s3-filestore` uncommented
- `DISABLE_LITELLM_STREAMING=false`
- `LLM_SOCKET_READ_TIMEOUT=600`
- `GENERATIVE_MODEL_ACCESS_CHECK_FREQ=300` (5 minutes)
2026-06-30 23:04:24 +02:00