feat: issue #7 — латентность до API провайдеров в пункте 5 «Статус»
Добавлен блок «API доступность» с curl time_connect до api.anthropic.com, api.deepseek.com, api.openai.com, api.kimi.com, openrouter.ai. Показывает время соединения или «недоступен» при timeout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
13
setup.sh
13
setup.sh
@@ -147,6 +147,19 @@ case "$choice" in
|
|||||||
echo -e " ${YEL}✗${CLR} $name (не задан)"
|
echo -e " ${YEL}✗${CLR} $name (не задан)"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e "${BLD}API доступность:${CLR}"
|
||||||
|
for entry in "Anthropic:api.anthropic.com" "DeepSeek:api.deepseek.com" "OpenAI:api.openai.com" "Kimi:api.kimi.com" "OpenRouter:openrouter.ai"; do
|
||||||
|
_name="${entry%%:*}"
|
||||||
|
_host="${entry##*:}"
|
||||||
|
_ms=$(curl -s -o /dev/null -w "%{time_connect}" --max-time 5 "https://$_host" 2>/dev/null)
|
||||||
|
if [ -n "$_ms" ] && [ "$_ms" != "0.000000" ]; then
|
||||||
|
echo -e " ${GRN}✓${CLR} $_name: ${_ms}s"
|
||||||
|
else
|
||||||
|
echo -e " ${YEL}✗${CLR} $_name: недоступен"
|
||||||
|
fi
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
6)
|
6)
|
||||||
bash tests/test_network.sh
|
bash tests/test_network.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user