## 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)
234 lines
No EOL
7.4 KiB
YAML
234 lines
No EOL
7.4 KiB
YAML
general_settings:
|
|
master_key: os.environ/LITELLM_MASTER_KEY
|
|
database_url: os.environ/DATABASE_URL
|
|
store_model_in_db: true
|
|
store_prompts_in_spend_logs: false
|
|
use_redis_transaction_buffer: true # Required for high traffic (1000+ RPS) [1]
|
|
user_api_key_cache_ttl: 300 # Optional: TTL for API key auth cache [2]
|
|
enable_redis_auth_cache: true
|
|
allow_requests_on_db_unavailable: true
|
|
json_logs: true
|
|
# LiteLLM Proxy Configuration for Infomaniak AI API
|
|
# Base URL: https://api.infomaniak.com/2/ai/105341/openai/v1
|
|
|
|
model_list:
|
|
# Primary Model: Qwen3.5 (LivQwen)
|
|
- model_name: LivQwen
|
|
litellm_params:
|
|
model: openai/Qwen/Qwen3.5-397B-A17B-FP8
|
|
api_base: https://api.infomaniak.com/2/ai/105341/openai/v1
|
|
api_key: os.environ/INFOMANIAK_API_KEY
|
|
rpm: 50
|
|
tpm: 100000
|
|
timeout: 600
|
|
max_retries: 3
|
|
retry_policy:
|
|
RateLimitError: 5
|
|
Timeout: 3
|
|
APIConnectionError: 3
|
|
model_info:
|
|
id: "infomaniak-qwen-1"
|
|
base_model: "Qwen/Qwen3.5-397B-A17B-FP8"
|
|
# Model capabilities (Infomaniak doesn't provide these via API)
|
|
input_cost_per_token: 0.0 # Set based on Infomaniak pricing
|
|
output_cost_per_token: 0.0
|
|
max_tokens: 200000
|
|
input_cost_per_second: 0.0
|
|
output_cost_per_second: 0.0
|
|
# Capabilities
|
|
supports_vision: true # Qwen3.5 has vision capabilities
|
|
supports_reasoning: true # Qwen3.5 has enhanced reasoning
|
|
supports_function_calling: true
|
|
supports_parallel_function_calling: true
|
|
supports_response_schema: true
|
|
supports_system_messages: true
|
|
supports_tool_choice: true
|
|
supports_web_search: false # Unless Infomaniak enables it
|
|
supports_prompt_caching: false
|
|
supports_embedding: false
|
|
supports_audio_input: false
|
|
supports_audio_output: false
|
|
supports_computer_use: false
|
|
# Model family info
|
|
mode: "chat"
|
|
model_group: "qwen-family"
|
|
region: "eu-west" # Infomaniak is Switzerland-based
|
|
|
|
# Secondary Model: Kimi-K2.6 (LivKimi)
|
|
- model_name: LivKimi
|
|
litellm_params:
|
|
model: openai/moonshotai/Kimi-K2.6
|
|
api_base: https://api.infomaniak.com/2/ai/105341/openai/v1
|
|
api_key: os.environ/INFOMANIAK_API_KEY
|
|
rpm: 50
|
|
tpm: 100000
|
|
timeout: 600
|
|
max_retries: 3
|
|
retry_policy:
|
|
RateLimitError: 5
|
|
Timeout: 3
|
|
APIConnectionError: 3
|
|
model_info:
|
|
id: "infomaniak-kimi-1"
|
|
base_model: "moonshotai/Kimi-K2.6"
|
|
# Model capabilities
|
|
input_cost_per_token: 0.0
|
|
output_cost_per_token: 0.0
|
|
max_tokens: 256000
|
|
input_cost_per_second: 0.0
|
|
output_cost_per_second: 0.0
|
|
# Capabilities
|
|
supports_vision: true # Kimi K2.5+ supports vision
|
|
supports_reasoning: true # Strong reasoning capabilities
|
|
supports_function_calling: true
|
|
supports_parallel_function_calling: true
|
|
supports_response_schema: true
|
|
supports_system_messages: true
|
|
supports_tool_choice: true
|
|
supports_web_search: false
|
|
supports_prompt_caching: false
|
|
supports_embedding: false
|
|
supports_audio_input: false
|
|
supports_audio_output: false
|
|
supports_computer_use: false
|
|
# Model family info
|
|
mode: "chat"
|
|
model_group: "kimi-family"
|
|
region: "eu-west"
|
|
|
|
# Tertiary Model: Gemma-4 (LivGemma)
|
|
- model_name: LivGemma
|
|
litellm_params:
|
|
model: openai/google/gemma-4-31B-it
|
|
api_base: https://api.infomaniak.com/2/ai/105341/openai/v1
|
|
api_key: os.environ/INFOMANIAK_API_KEY
|
|
rpm: 50
|
|
tpm: 100000
|
|
timeout: 600
|
|
max_retries: 3
|
|
retry_policy:
|
|
RateLimitError: 5
|
|
Timeout: 3
|
|
APIConnectionError: 3
|
|
model_info:
|
|
id: "infomaniak-gemma-1"
|
|
base_model: "google/gemma-4-31B-it"
|
|
# Model capabilities
|
|
input_cost_per_token: 0.0
|
|
output_cost_per_token: 0.0
|
|
max_tokens: 100000
|
|
input_cost_per_second: 0.0
|
|
output_cost_per_second: 0.0
|
|
# Capabilities
|
|
supports_vision: false # Gemma-4-31B-it is text-only
|
|
supports_reasoning: false # Basic reasoning, not enhanced
|
|
supports_function_calling: true
|
|
supports_parallel_function_calling: false
|
|
supports_response_schema: true
|
|
supports_system_messages: true
|
|
supports_tool_choice: true
|
|
supports_web_search: false
|
|
supports_prompt_caching: false
|
|
supports_embedding: false
|
|
supports_audio_input: false
|
|
supports_audio_output: false
|
|
supports_computer_use: false
|
|
# Model family info
|
|
mode: "chat"
|
|
model_group: "gemma-family"
|
|
region: "eu-west"
|
|
|
|
# Cost-Optimized Model: Nemotron-3-Nano (LivNemotron)
|
|
# Best for: high-volume tasks like Onyx contextual retrieval, classification,
|
|
# summarization, and any workload where cost matters more than
|
|
# peak reasoning quality.
|
|
# Infomaniak pricing (CHF): 0.05 / 1M input tokens | 0.20 / 1M output tokens
|
|
- model_name: LivNemotron
|
|
litellm_params:
|
|
model: openai/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-FP8
|
|
api_base: https://api.infomaniak.com/2/ai/105341/openai/v1
|
|
api_key: os.environ/INFOMANIAK_API_KEY
|
|
rpm: 50
|
|
tpm: 100000
|
|
timeout: 600
|
|
max_retries: 3
|
|
retry_policy:
|
|
RateLimitError: 5
|
|
Timeout: 3
|
|
APIConnectionError: 3
|
|
model_info:
|
|
id: "infomaniak-nemotron-nano-1"
|
|
base_model: "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-FP8"
|
|
input_cost_per_token: 0.0
|
|
output_cost_per_token: 0.0
|
|
max_tokens: 128000
|
|
input_cost_per_second: 0.0
|
|
output_cost_per_second: 0.0
|
|
# Capabilities
|
|
supports_vision: false # Text-only model
|
|
supports_reasoning: false # Standard instruction following, not deep reasoning
|
|
supports_function_calling: true # Basic tool use supported
|
|
supports_parallel_function_calling: false
|
|
supports_response_schema: true
|
|
supports_system_messages: true
|
|
supports_tool_choice: true
|
|
supports_web_search: false
|
|
supports_prompt_caching: false
|
|
supports_embedding: false
|
|
supports_audio_input: false
|
|
supports_audio_output: false
|
|
supports_computer_use: false
|
|
# Model family info
|
|
mode: "chat"
|
|
model_group: "nemotron-family"
|
|
region: "eu-west"
|
|
|
|
|
|
router_settings:
|
|
redis_host: litellm-redis
|
|
redis_port: 6379
|
|
redis_password: os.environ/REDIS_PASSWORD
|
|
routing_strategy: simple-shuffle
|
|
num_retries: 3
|
|
retry_after: 5
|
|
allowed_fails: 3
|
|
cooldown_time: 30
|
|
enable_pre_call_checks: true
|
|
|
|
# Retry policy for different error types
|
|
retry_policy:
|
|
RateLimitErrorRetries: 5
|
|
TimeoutErrorRetries: 3
|
|
AuthenticationErrorRetries: 0
|
|
BadRequestErrorRetries: 1
|
|
InternalServerErrorRetries: 4
|
|
|
|
# Allowed fails policy before cooldown
|
|
allowed_fails_policy:
|
|
BadRequestErrorAllowedFails: 1000
|
|
AuthenticationErrorAllowedFails: 5
|
|
TimeoutErrorAllowedFails: 12
|
|
RateLimitErrorAllowedFails: 10000
|
|
InternalServerErrorAllowedFails: 20
|
|
|
|
fallbacks:
|
|
- LivQwen: [LivKimi, LivGemma]
|
|
- LivKimi: [LivGemma, LivQwen]
|
|
- LivGemma: [LivKimi, LivQwen]
|
|
|
|
# LiteLLM module settings
|
|
litellm_settings:
|
|
drop_params: false
|
|
set_verbose: false
|
|
request_timeout: 600
|
|
num_retries: 3
|
|
cache: true # Enable caching [2]
|
|
cache_params:
|
|
type: redis
|
|
host: litellm-redis
|
|
port: 6379
|
|
password: os.environ/REDIS_PASSWORD
|
|
ttl: 3600
|
|
namespace: "litellm.livtec.caching"
|
|
redact_user_api_key_info: true
|
|
turn_off_message_logging: false |