fix: accept auth-protected OmniRoute health
This commit is contained in:
parent
e0882d0779
commit
d7d9e4822f
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue