From df401ca3339cd5e6d7f2020163752461c8d9812f Mon Sep 17 00:00:00 2001 From: vitaly Date: Sun, 7 Jun 2026 20:17:28 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20issue=20#7=20=E2=80=94=20=D0=BB=D0=B0?= =?UTF-8?q?=D1=82=D0=B5=D0=BD=D1=82=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=B4?= =?UTF-8?q?=D0=BE=20API=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B0=D0=B9=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=20=D0=B2=20=D0=BF=D1=83=D0=BD=D0=BA=D1=82?= =?UTF-8?q?=D0=B5=205=20=C2=AB=D0=A1=D1=82=D0=B0=D1=82=D1=83=D1=81=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавлен блок «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 --- setup.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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