Spaces:
Running
Running
File size: 1,329 Bytes
4badc3b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${BASE_URL:-http://localhost:8080}"
: "${PROXY_API_KEY:?Set PROXY_API_KEY before running acceptance tests}"
request() {
local name="$1"
shift
echo "==> ${name}"
curl --fail-with-body --silent --show-error "$@"
echo
}
request "health" "${BASE_URL}/health"
request "models" \
-H "Authorization: Bearer ${PROXY_API_KEY}" \
"${BASE_URL}/v1/models"
request "non-streaming alias" \
-H "Authorization: Bearer ${PROXY_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"model":"antigravity/gemini-3-flash","messages":[{"role":"user","content":"Reply with READY only."}],"stream":false}' \
"${BASE_URL}/v1/chat/completions"
request "reasoning high" \
-H "Authorization: Bearer ${PROXY_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"model":"antigravity/gemini-3-flash","messages":[{"role":"user","content":"Reply with READY only."}],"reasoning_effort":"high","stream":false}' \
"${BASE_URL}/v1/chat/completions"
echo "==> streaming"
curl --fail-with-body --no-buffer --silent --show-error \
-H "Authorization: Bearer ${PROXY_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"model":"antigravity/gemini-3-flash","messages":[{"role":"user","content":"Count from 1 to 3."}],"stream":true}' \
"${BASE_URL}/v1/chat/completions"
echo
|