diff --git a/setup.sh b/setup.sh index 86bfa53..c7ea0d3 100755 --- a/setup.sh +++ b/setup.sh @@ -147,6 +147,19 @@ case "$choice" in echo -e " ${YEL}✗${CLR} $name (не задан)" fi 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) bash tests/test_network.sh