From d7d9e4822f588e7808b90fc11396890ba27c9ae0 Mon Sep 17 00:00:00 2001 From: "juvenal.diaz" Date: Thu, 8 Oct 2026 08:44:05 -0600 Subject: [PATCH] fix: accept auth-protected OmniRoute health --- lib/jeannie/pipeline.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/jeannie/pipeline.sh b/lib/jeannie/pipeline.sh index 7f04eb9..c67ea27 100644 --- a/lib/jeannie/pipeline.sh +++ b/lib/jeannie/pipeline.sh @@ -5339,6 +5339,7 @@ deploy_ai_stack() { local port="${LAB_OMNIROUTE_PORT:-20128}" local container_name="${LAB_OMNIROUTE_CONTAINER_NAME:-omniroute}" local existing_workdir + local models_status require_debian_server "deploy-ai-stack" @@ -5380,10 +5381,13 @@ deploy_ai_stack() { sudo docker compose --env-file "${install_dir}/.env" ps ) - if curl -fsS --connect-timeout 2 --max-time 5 "http://127.0.0.1:${port}/v1/models" >/dev/null 2>&1; then + 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 echo "AI gateway OpenAI-compatible endpoint is reachable at http://127.0.0.1:${port}/v1." + elif [[ "${models_status}" == "401" ]]; then + echo "AI gateway OpenAI-compatible endpoint is reachable and auth-protected at http://127.0.0.1:${port}/v1." else - echo "AI gateway container started, but /v1/models did not respond yet; check logs with:" >&2 + echo "AI gateway container started, but /v1/models returned HTTP ${models_status:-000}; check logs with:" >&2 echo " cd ${install_dir} && sudo docker compose --env-file .env logs --tail=120" >&2 fi