#!/usr/bin/env bash set -euo pipefail PORT=${1:?port} ALIAS=${2:?alias} echo "[probe] models list:" >&2 curl -sS http://127.0.0.1:$PORT/v1/models | jq -r '.data[0].id' || true echo "[probe] chat test:" >&2 curl -sS http://127.0.0.1:$PORT/v1/chat/completions \ -H 'Content-Type: application/json' \ -d "{\"model\":\"$ALIAS\",\"messages\":[{\"role\":\"user\",\"content\":\"Say hi\"}],\"max_tokens\":16}" \ | jq -r '.choices[0].message.content // .error.message'