feat(ift): EventHub AI Router stack for Zed
FastAPI gateway with A/B/C lane orchestration, LiteLLM proxy config, Swarm stack (postgres, redis, VPN off-by-default), deploy/smoke/audit scripts.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
# Load Swarm secrets into env and start LiteLLM proxy
|
||||
set -eu
|
||||
|
||||
read_secret() {
|
||||
if [ -f "$1" ]; then
|
||||
tr -d '\n\r' < "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -f /run/secrets/novita_api_key ]; then
|
||||
export NOVITA_API_KEY="$(read_secret /run/secrets/novita_api_key)"
|
||||
fi
|
||||
if [ -f /run/secrets/litellm_master_key ]; then
|
||||
export LITELLM_MASTER_KEY="$(read_secret /run/secrets/litellm_master_key)"
|
||||
fi
|
||||
if [ -f /run/secrets/litellm_salt_key ]; then
|
||||
export LITELLM_SALT_KEY="$(read_secret /run/secrets/litellm_salt_key)"
|
||||
fi
|
||||
if [ -f /run/secrets/groq_api_key ]; then
|
||||
export GROQ_API_KEY="$(read_secret /run/secrets/groq_api_key)"
|
||||
fi
|
||||
if [ -f /run/secrets/gemini_api_key ]; then
|
||||
export GEMINI_API_KEY="$(read_secret /run/secrets/gemini_api_key)"
|
||||
fi
|
||||
if [ -f /run/secrets/postgres_password ]; then
|
||||
export POSTGRES_PASSWORD="$(read_secret /run/secrets/postgres_password)"
|
||||
export DATABASE_URL="postgresql://${POSTGRES_USER:-litellm}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB:-litellm}"
|
||||
fi
|
||||
|
||||
exec litellm --config /app/config.yaml --port 4000 --num_workers 2 "$@"
|
||||
Reference in New Issue
Block a user