fix: forward AI stack model overrides
Homelab Main / validate (push) Waiting to run Details
Homelab Main / running-update (push) Blocked by required conditions Details
Homelab Main / debian-ops (push) Blocked by required conditions Details

This commit is contained in:
juvenal.diaz 2026-10-08 15:45:11 -06:00
parent fef83e688f
commit 6bab4d9684
1 changed files with 23 additions and 1 deletions

View File

@ -5382,7 +5382,29 @@ deploy_ai_stack() {
sudo docker compose --env-file "${install_dir}/.env" ps
)
LAB_AI_STACK_INSTALL_DIR="${install_dir}" LAB_OMNIROUTE_PORT="${port}" "${install_dir}/bootstrap-omniroute.sh"
local bootstrap_env=(
"LAB_AI_STACK_INSTALL_DIR=${install_dir}"
"LAB_OMNIROUTE_PORT=${port}"
)
if [[ ${LAB_AI_STACK_OPENROUTER_MODELS+x} ]]; then
bootstrap_env+=("LAB_AI_STACK_OPENROUTER_MODELS=${LAB_AI_STACK_OPENROUTER_MODELS}")
fi
if [[ ${LAB_AI_STACK_NVIDIA_MODELS+x} ]]; then
bootstrap_env+=("LAB_AI_STACK_NVIDIA_MODELS=${LAB_AI_STACK_NVIDIA_MODELS}")
fi
if [[ ${LAB_AI_STACK_ENABLE_NVIDIA_DISCOVERY+x} ]]; then
bootstrap_env+=("LAB_AI_STACK_ENABLE_NVIDIA_DISCOVERY=${LAB_AI_STACK_ENABLE_NVIDIA_DISCOVERY}")
fi
if [[ ${LAB_AI_STACK_MODEL_VALIDATE_ATTEMPTS+x} ]]; then
bootstrap_env+=("LAB_AI_STACK_MODEL_VALIDATE_ATTEMPTS=${LAB_AI_STACK_MODEL_VALIDATE_ATTEMPTS}")
fi
if [[ ${LAB_AI_STACK_FAST_MODEL_TARGET+x} ]]; then
bootstrap_env+=("LAB_AI_STACK_FAST_MODEL_TARGET=${LAB_AI_STACK_FAST_MODEL_TARGET}")
fi
if [[ ${LAB_AI_STACK_SMART_MODEL_TARGET+x} ]]; then
bootstrap_env+=("LAB_AI_STACK_SMART_MODEL_TARGET=${LAB_AI_STACK_SMART_MODEL_TARGET}")
fi
env "${bootstrap_env[@]}" "${install_dir}/bootstrap-omniroute.sh"
models_status="$(curl -sS -o /dev/null -w '%{http_code}' --connect-timeout 2 --max-time 5 "http://127.0.0.1:${port}/v1/models" 2>/dev/null || true)"
if [[ "${models_status}" == "200" ]]; then