improved free-models-collector with liveness checks
This commit is contained in:
+69
-5
@@ -11,7 +11,7 @@ TCONFIG="$(mktemp)"
|
||||
$REQ https://opencode.ai/zen/v1/models | jq -r '.data[] | select(.id | test("-free")) | "\(.id),-,https://opencode.ai/zen/v1,"' >> "$TCONFIG"
|
||||
|
||||
# Write Kilo free models
|
||||
$REQ https://api.kilo.ai/api/openrouter/models | jq -r '.data[] | select(.isFree) | "\(.id),-,https://api.kilo.ai/api/openrouter,"' >> "$TCONFIG"
|
||||
$REQ https://api.kilo.ai/api/gateway/models | jq -r '.data[] | select(.isFree) | "\(.id),-,https://api.kilo.ai/api/gateway,"' >> "$TCONFIG"
|
||||
|
||||
# Write OVHCloud free trial models (2 req per minute per IP keyless), commented out by default
|
||||
# $REQ https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/models | jq -r '.data[] | "\(.id),-,https://oai.endpoints.kepler.ai.cloud.ovh.net,"' | grep -Ev 'tts-|whisper-|bge-' >> "$TCONFIG"
|
||||
@@ -22,8 +22,8 @@ $REQ https://api.llm7.io/v1/models | jq -r '.data[] | select(.usage_based_only |
|
||||
# Write UncloseAI models
|
||||
$REQ https://hermes.ai.unturf.com/v1/models | jq -r '.data[] | "\(.id),-,https://hermes.ai.unturf.com/v1,"' >> "$TCONFIG"
|
||||
|
||||
# Write AIHorde models, slow but community-powered
|
||||
$REQ https://oai.aihorde.net/v1/models | jq -r '.data[] | "\(.id),0000000000,https://oai.aihorde.net/v1,"' >> "$TCONFIG"
|
||||
# Write AIHorde models, slow but community-powered, commented out by default
|
||||
# $REQ https://oai.aihorde.net/v1/models | jq -r '.data[] | "\(.id),0000000000,https://oai.aihorde.net/v1,"' >> "$TCONFIG"
|
||||
|
||||
# Write Pekpik models (need to be rotated frequently, highly experimental, commented out by default)
|
||||
# $REQ https://aiapiv2.pekpik.com/free-keys.json | jq -r '.keys[] | "\(.model),\(.key),https://aiapiv2.pekpik.com/v1,"' >> "$TCONFIG"
|
||||
@@ -42,10 +42,74 @@ $REQ https://zsnonsky-nim-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,
|
||||
# Write XORTRON as hardcode
|
||||
echo 'xortron,-,https://darkc0de-chat.hf.space/v1,'>> "$TCONFIG"
|
||||
|
||||
# Verify each collected model for responsiveness under the actual /chat/completions
|
||||
# (prompt it to respond with OK). Unresponsive models are dropped from the final file.
|
||||
# For non-timeout drops, the HTTP response code is reported for diagnostics.
|
||||
VCONFIG="$(mktemp)"
|
||||
SKIPF="$(mktemp)"
|
||||
while IFS=',' read -r model key endpoint extra; do
|
||||
[ -z "$model" ] && continue
|
||||
case "$model" in *embed*) echo "Skipped (embedding model): $model @ $endpoint" >&2; continue;; esac
|
||||
if grep -qxF "$endpoint" "$SKIPF" 2>/dev/null; then
|
||||
echo "Skipped (endpoint unreachable): $model @ $endpoint" >&2
|
||||
continue
|
||||
fi
|
||||
auth=''
|
||||
[ "$key" != '-' ] && auth="-H Authorization: Bearer $key"
|
||||
payload="$(jq -nc --arg m "$model" '{model:$m,messages:[{role:"user",content:"Reply with the word OK only."}],max_tokens:8,stream:true}')"
|
||||
bodyf="$(mktemp)"
|
||||
attempt=0
|
||||
max_attempts=3
|
||||
ok=0
|
||||
reason=''
|
||||
while [ "$attempt" -lt "$max_attempts" ]; do
|
||||
attempt=$((attempt+1))
|
||||
out="$(curl -sS -m 8 -o "$bodyf" -w '%{http_code}|%{time_starttransfer}' \
|
||||
-X POST "$endpoint/chat/completions" \
|
||||
-H 'Content-Type: application/json' $auth \
|
||||
-d "$payload" 2>/dev/null)"
|
||||
rc=$?
|
||||
http_code="${out%%|*}"
|
||||
ttft="${out##*|}"
|
||||
if [ "$http_code" -ge 200 ] && [ "$http_code" -lt 300 ] && awk "BEGIN{exit !($ttft>0)}"; then
|
||||
ok=1
|
||||
break
|
||||
fi
|
||||
if [ "$rc" -eq 28 ]; then
|
||||
reason="Timeout error (no first token within 8s)"
|
||||
elif [ "$rc" -ne 0 ]; then
|
||||
reason="curl error $rc"
|
||||
else
|
||||
reason="HTTP $http_code"
|
||||
fi
|
||||
retryable=0
|
||||
if [ "$rc" -eq 28 ] || [ "$rc" -ne 0 ] || [ "$http_code" -eq 429 ] || { [ "$http_code" -ge 500 ] && [ "$http_code" -lt 600 ]; }; then
|
||||
retryable=1
|
||||
fi
|
||||
if [ "$retryable" -eq 1 ] && [ "$attempt" -lt "$max_attempts" ]; then
|
||||
sleep 3
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$ok" -eq 1 ]; then
|
||||
echo "Added: $model @ $endpoint (TTFT: ${ttft}s)"
|
||||
printf '%s,%s,%s,%s\n' "$model" "$key" "$endpoint" "$extra" >> "$VCONFIG"
|
||||
else
|
||||
echo "Unresponsive ($reason), dropped: $model @ $endpoint" >&2
|
||||
if [ "$rc" -eq 6 ] || [ "$rc" -eq 7 ]; then
|
||||
printf '%s\n' "$endpoint" >> "$SKIPF"
|
||||
fi
|
||||
fi
|
||||
rm -f "$bodyf"
|
||||
done < "$TCONFIG"
|
||||
rm -f "$TCONFIG"
|
||||
rm -f "$SKIPF"
|
||||
|
||||
# Write the config header
|
||||
printf 'model,key,endpoint,extra\n' > "$CONFIG"
|
||||
# Finalize the config
|
||||
sort -u "$TCONFIG" | grep -v embed >> "$CONFIG"
|
||||
rm -f "$TCONFIG"
|
||||
sort -u "$VCONFIG" >> "$CONFIG"
|
||||
rm -f "$VCONFIG"
|
||||
|
||||
exit 0
|
||||
|
||||
+1
-56
@@ -3,22 +3,13 @@ model,key,endpoint,extra
|
||||
adept/fuyu-8b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
ai21labs/jamba-1.5-large-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
aisingapore/sea-lion-7b-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
aphrodite/SicariusSicariiStuff/Impish_Bloodmoon_12B,0000000000,https://oai.aihorde.net/v1,
|
||||
aphrodite/SicariusSicariiStuff/Impish_LLAMA_4B,0000000000,https://oai.aihorde.net/v1,
|
||||
aphrodite/TheDrummer/Behemoth-X-123B-v2.1,0000000000,https://oai.aihorde.net/v1,
|
||||
aphrodite/TheDrummer/Cydonia-24B-v4.3,0000000000,https://oai.aihorde.net/v1,
|
||||
aphrodite/TheDrummer/Skyfall-31B-v4.2,0000000000,https://oai.aihorde.net/v1,
|
||||
bigcode/starcoder2-15b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
codestral-latest,-,https://api.llm7.io/v1,
|
||||
cohere/north-mini-code:free,-,https://api.kilo.ai/api/openrouter,
|
||||
databricks/dbrx-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
deepseek-ai/deepseek-coder-6.7b-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
deepseek-ai/deepseek-v4-flash-0731,-,https://garystu-openai-nim-proxy.hf.space/v1,
|
||||
deepseek-ai/deepseek-v4-flash-0731,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
deepseek-ai/deepseek-v4-pro-0813,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
deepseek-v4-flash-free,-,https://opencode.ai/zen/v1,
|
||||
deepseek-v4-pro,-,https://mmoranguito-openai-nim-proxy.hf.space/v1,
|
||||
dots-studio/dots-3-note-preview:free,-,https://api.kilo.ai/api/openrouter,
|
||||
Felladrin/LittleLamb-293M-RP,0000000000,https://oai.aihorde.net/v1,
|
||||
google/codegemma-1.1-7b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
google/codegemma-7b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
google/deplot,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
@@ -26,7 +17,6 @@ google/diffusiongemma-26b-a4b-it,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
google/gemma-2b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
google/gemma-3-12b-it,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
google/gemma-3-4b-it,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
google/gemma-4-31b-it,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
google/recurrentgemma-2b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
ibm/granite-3.0-3b-a800m-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
ibm/granite-3.0-8b-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
@@ -35,49 +25,16 @@ ibm/granite-8b-code-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
inclusionai/ling-3.0-flash-fin:free,-,https://api.kilo.ai/api/openrouter,
|
||||
inclusionai/ling-3.0-flash-sante:free,-,https://api.kilo.ai/api/openrouter,
|
||||
kilo-auto/free,-,https://api.kilo.ai/api/openrouter,
|
||||
kimi-3,-,https://mmoranguito-openai-nim-proxy.hf.space/v1,
|
||||
kimi-k3,-,https://mmoranguito-openai-nim-proxy.hf.space/v1,
|
||||
koboldcpp/Angelic_Eclipse-12B,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/debug-Froopert-31B-v1.1-Q4_K_M,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/digo-prayudha/unsloth-llama-3.2-1b-gguf,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/gemma-4-31B-it-heretic,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Gemma-4-E4B-it-Ultra-Uncensored-Heretic,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Gemma-4-E4B-Uncensored-HauhauCS-Aggressive-Q4_K_M,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/L3-8B-Stheno-v3.2,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/L3-8B-Stheno-v3.2-Q5_K_M,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/L3-8B-Stheno-v3.2-Q8_0,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/L3-Super-Nova-RP-8B,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Llama-3.1-8B-Stheno-v3.4-Q4_K_M-imat,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Llama-3.2-3B,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/llama-3.2-3b-instruct-q4_k_m,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Llama-3.2-3B-Instruct-Q4_K_M,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/mini-magnum-12b-v1.1,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/MN-Violet-Lotus-12B.Q8_0,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/mradermacher/Cerebras-GPT-111M-instruction-GGUF,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/mradermacher/pythia-70m-deduped.f16.gguf,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Qwen2.5-7B-Q4_K_M,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Qwen3.8-27B-Uncensored,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Qwen_Qwen3-0.6B-IQ4_XS,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Qwen/Qwen3.5-0.8B,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/ReadyArt/Forgotten-Safeword-22B,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/Rocinante-X-12B,0000000000,https://oai.aihorde.net/v1,
|
||||
koboldcpp/TheDrummer_Behemoth-128B-v3-Q4_K_M,0000000000,https://oai.aihorde.net/v1,
|
||||
ling-3.0-flash-fin-free,-,https://opencode.ai/zen/v1,
|
||||
liquid/lfm-2.5-2.6b:free,-,https://api.kilo.ai/api/openrouter,
|
||||
Lorbus/Qwen3.6-27B-int4-AutoRound,-,https://hermes.ai.unturf.com/v1,
|
||||
meta/codellama-70b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
meta/llama2-70b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
meta/llama-3.2-11b-vision-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
meta/llama-3.2-90b-vision-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
meta/llama-guard-4-12b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
meta/muse-glimmer-30b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
microsoft/kosmos-2,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
microsoft/phi-3.5-moe-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
microsoft/phi-3-vision-128k-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
mimo-v2.5-free,-,https://opencode.ai/zen/v1,
|
||||
minimaxai/minimax-m3,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
minimax-m2.7,-,https://api.llm7.io/v1,
|
||||
mistral-7b,-,https://mmoranguito-openai-nim-proxy.hf.space/v1,
|
||||
mistralai/codestral-22b-instruct-v0.1,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
mistralai/mistral-7b-instruct-v0.3,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
mistralai/mistral-large-2-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
@@ -87,12 +44,6 @@ mistralai/mixtral-8x22b-v0.1,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
mistral-Nemo-Instruct-2407,-,https://api.llm7.io/v1,
|
||||
moonshotai/kimi-k2.6,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
moonshotai/kimi-k3,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
muse-spark-1.2-contributor-free,-,https://opencode.ai/zen/v1,
|
||||
muse-spark-1.3-contributor-free,-,https://opencode.ai/zen/v1,
|
||||
nemotron-3.5-lightning-free,-,https://opencode.ai/zen/v1,
|
||||
nemotron-3-ultra-free,-,https://opencode.ai/zen/v1,
|
||||
nemotron-70b,-,https://mmoranguito-openai-nim-proxy.hf.space/v1,
|
||||
nemotron-ultra,-,https://mmoranguito-openai-nim-proxy.hf.space/v1,
|
||||
nex-agi/nex-n2.5-mini:free,-,https://api.kilo.ai/api/openrouter,
|
||||
nex-agi/nex-n2.5-pro:free,-,https://api.kilo.ai/api/openrouter,
|
||||
nvidia/ai-synthetic-video-detector,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
@@ -108,13 +59,11 @@ nvidia/llama3-chatqa-1.5-70b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/mistral-nemo-minitron-8b-8k-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/nemotron-3.5-content-safety:free,-,https://api.kilo.ai/api/openrouter,
|
||||
nvidia/nemotron-3.5-content-safety,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/nemotron-3.5-lightning-30b-a3b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/nemotron-3.5-lightning:free,-,https://api.kilo.ai/api/openrouter,
|
||||
nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free,-,https://api.kilo.ai/api/openrouter,
|
||||
nvidia/nemotron-3-nano-omni-30b-a3b-reasoning,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/nemotron-3-super-120b-a12b:free,-,https://api.kilo.ai/api/openrouter,
|
||||
nvidia/nemotron-3-super-120b-a12b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/nemotron-3-ultra-550b-a55b:free,-,https://api.kilo.ai/api/openrouter,
|
||||
nvidia/nemotron-3-ultra-550b-a55b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/nemotron-4-340b-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/nemotron-4-340b-reward,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
@@ -127,15 +76,11 @@ nvidia/riva-translate-4b-instruct-v1.1,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/riva-translate-4b-instruct-v2,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nvidia/vila,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
nv-mistralai/mistral-nemo-12b-instruct,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
openai/gpt-oss-20b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
openrouter/free,-,https://api.kilo.ai/api/openrouter,
|
||||
poolside/laguna-s-2.1:free,-,https://api.kilo.ai/api/openrouter,
|
||||
poolside/laguna-xs-2.1:free,-,https://api.kilo.ai/api/openrouter,
|
||||
poolside/laguna-xs-2.1,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
Qwen/Qwen3.5-35B-A3B,0000000000,https://oai.aihorde.net/v1,
|
||||
stepfun/step-3.7-flash:free,-,https://api.kilo.ai/api/openrouter,
|
||||
thinkingmachines/inkling:free,-,https://api.kilo.ai/api/openrouter,
|
||||
thinkingmachines/inkling-small:free,-,https://api.kilo.ai/api/openrouter,
|
||||
writer/palmyra-creative-122b,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
writer/palmyra-fin-70b-32k,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
writer/palmyra-med-70b-32k,-,https://zsnonsky-nim-proxy.hf.space/v1,
|
||||
|
||||
|
Reference in New Issue
Block a user