Files
EventHubAiRouter/scripts/litellm-entrypoint.sh
aleksey a2d238d92e
CI / build-gateway (push) Failing after 16s
CI / sync-config (push) Failing after 0s
feat(agent): hierarchical executor with path resolve, runtime probe, quiet UI
Make Zed Agent closer to Cursor: deterministic DevOps path index, live Traefik
port probe before blind edits, stop-after-edit, and quieter Russian progress.
2026-08-13 11:41:27 +03:00

47 lines
1.6 KiB
Bash

#!/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/xai_api_key ]; then
export XAI_API_KEY="$(read_secret /run/secrets/xai_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/together_api_key ]; then
export TOGETHER_API_KEY="$(read_secret /run/secrets/together_api_key)"
fi
if [ -f /run/secrets/openrouter_api_key ]; then
export OPENROUTER_API_KEY="$(read_secret /run/secrets/openrouter_api_key)"
fi
if [ -f /run/secrets/anthropic_api_key ]; then
export ANTHROPIC_API_KEY="$(read_secret /run/secrets/anthropic_api_key)"
fi
if [ -f /run/secrets/gigachat_credentials ]; then
export GIGACHAT_CREDENTIALS="$(read_secret /run/secrets/gigachat_credentials)"
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 "$@"