health-check: route remaining bearer placeholders through $LLK env guard
This commit is contained in:
@@ -150,7 +150,7 @@ MODEL_FAILS=0
|
|||||||
for model in $MODELS; do
|
for model in $MODELS; do
|
||||||
echo -n " Model $model... "
|
echo -n " Model $model... "
|
||||||
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 30 \
|
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 30 \
|
||||||
-H "Authorization: Bearer $MONITOR_KEY" \
|
-H "Authorization: Bearer $LLK" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"model\":\"$model\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":5}" \
|
-d "{\"model\":\"$model\",\"messages\":[{\"role\":\"user\",\"content\":\"ping\"}],\"max_tokens\":5}" \
|
||||||
"http://${LITELLM_HOST}:4000/v1/chat/completions" 2>/dev/null)
|
"http://${LITELLM_HOST}:4000/v1/chat/completions" 2>/dev/null)
|
||||||
@@ -166,7 +166,7 @@ done
|
|||||||
# 6. Agent keys
|
# 6. Agent keys
|
||||||
echo -n " Agent Keys... "
|
echo -n " Agent Keys... "
|
||||||
KEYS=$(curl -s --connect-timeout 10 \
|
KEYS=$(curl -s --connect-timeout 10 \
|
||||||
-H "Authorization: Bearer $MASTER_KEY" \
|
-H "Authorization: Bearer $LLK" \
|
||||||
"http://${LITELLM_HOST}:4000/key/list?return_full_object=true" 2>/dev/null)
|
"http://${LITELLM_HOST}:4000/key/list?return_full_object=true" 2>/dev/null)
|
||||||
AGENT_COUNT=$(echo "$KEYS" | python3 -c "
|
AGENT_COUNT=$(echo "$KEYS" | python3 -c "
|
||||||
import sys,json
|
import sys,json
|
||||||
|
|||||||
Reference in New Issue
Block a user