improved free model collector, updated default models

This commit is contained in:
Luxferre
2026-09-09 09:55:06 +03:00
parent 0e56985b04
commit 74199ad3f1
2 changed files with 25 additions and 68 deletions
+17 -54
View File
@@ -1,6 +1,6 @@
#!/bin/sh
# Free model collector script for Dynagate
# Depends upon curl, awk and jq
# Depends upon curl and jq
# Created by Luxferre in 2026, released into the public domain
REQ='curl -fsSL'
@@ -8,81 +8,44 @@ CONFIG='models.csv'
TCONFIG="$(mktemp)"
# Write OpenCode Zen free models
printf 'big-pickle,-,https://opencode.ai/zen,\n' >> "$TCONFIG"
$REQ https://opencode.ai/zen/v1/models | jq -r '.data | map(select(.id | test("-free")) | .id) | .[]' | awk '{printf("%s,-,https://opencode.ai/zen/v1,\n",$0)}' >> "$TCONFIG"
$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 | map(select(.isFree) | .id) | .[]' | awk '{printf("%s,-,https://api.kilo.ai/api/openrouter,\n",$0)}' >> "$TCONFIG"
$REQ https://api.kilo.ai/api/openrouter/models | jq -r '.data[] | select(.isFree) | "\(.id),-,https://api.kilo.ai/api/openrouter,"' >> "$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' | grep -viE 'diffusion|whisper|ppl|guard|embedding|bge-|-tts-' | awk '{printf("%s,-,https://oai.endpoints.kepler.ai.cloud.ovh.net,\n",$0)}' >> "$TCONFIG"
# $REQ https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/models | jq -r '.data[] | "\(.id),-,https://oai.endpoints.kepler.ai.cloud.ovh.net,"' >> "$TCONFIG"
# Write LLM7 API models, heavily rate-limited
$REQ https://api.llm7.io/v1/models | jq -r '.data | map(select(.usage_based_only | not) | .id) | .[]' | awk '{printf("%s,-,https://api.llm7.io/v1,\n",$0)}' >> "$TCONFIG"
$REQ https://api.llm7.io/v1/models | jq -r '.data[] | select(.usage_based_only | not) | "\(.id),-,https://api.llm7.io/v1,"' >> "$TCONFIG"
# Write UncloseAI models
$REQ https://hermes.ai.unturf.com/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,-,https://hermes.ai.unturf.com/v1,\n",$0)}' >> "$TCONFIG"
$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' | awk '{printf("%s,0000000000,https://oai.aihorde.net/v1,\n",$0)}' >> "$TCONFIG"
$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"
## Write some independent gateways found on HF
$REQ https://mmoranguito-openai-nim-proxy.hf.space/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,-,https://mmoranguito-openai-nim-proxy.hf.space/v1,\n",$0)}' >> "$TCONFIG"
$REQ https://mmoranguito-openai-nim-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,https://mmoranguito-openai-nim-proxy.hf.space/v1,"' >> "$TCONFIG"
$REQ https://garystu-openai-nim-proxy.hf.space/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,-,https://garystu-openai-nim-proxy.hf.space/v1,\n",$0)}' >> "$TCONFIG"
$REQ https://garystu-openai-nim-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,https://garystu-openai-nim-proxy.hf.space/v1,"' >> "$TCONFIG"
$REQ https://zsnonsky-nim-proxy.hf.space/v1/models | jq -r '.data | .[] | .id' | awk '{printf("%s,-,https://zsnonsky-nim-proxy.hf.space/v1,\n",$0)}' >> "$TCONFIG"
$REQ https://zsnonsky-nim-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,https://zsnonsky-nim-proxy.hf.space/v1,"' >> "$TCONFIG"
# this one works but is very slow, commenting out by default
# $REQ https://covariate-my-nvidia-proxy.hf.space/v1/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://covariate-my-nvidia-proxy.hf.space/v1,\n",$0}' >> "$TCONFIG"
# this one works but is very slow, commented out by default
# $REQ https://covariate-my-nvidia-proxy.hf.space/v1/models | jq -r '.data[] | "\(.id),-,https://covariate-my-nvidia-proxy.hf.space/v1,"' >> "$TCONFIG"
# Write XORTRON as hardcode
echo 'xortron,-,https://darkc0de-chat.hf.space/v1,'>> "$TCONFIG"
### Uncomment for G4F public-hosted models (50 req per hour per IP keyless)
## Write G4F models (community backend)
#$REQ https://g4f.space/api/community/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/community,\n",$0}' >> "$TCONFIG"
## Write G4F models (gemini-v1beta backend)
#$REQ https://g4f.space/api/gemini-v1beta/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/gemini-v1beta,\n",$0}' >> "$TCONFIG"
## Write G4F models (Qwen backend)
#$REQ https://g4f.space/api/Qwen/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/Qwen,\n",$0}' >> "$TCONFIG"
## Write G4F models (QwenCode backend)
#$REQ https://g4f.space/api/QwenCode/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/QwenCode,\n",$0}' >> "$TCONFIG"
## Write G4F models (GLM backend)
#$REQ https://g4f.space/api/GLM/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/GLM,\n",$0}' >> "$TCONFIG"
## Write G4F models (OpenRouterFree backend)
#$REQ https://g4f.space/api/OpenRouterFree/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/OpenRouterFree,\n",$0}' >> "$TCONFIG"
## Write G4F models (HuggingFace backend)
#$REQ https://g4f.space/api/HuggingFace/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/HuggingFace,\n",$0}' >> "$TCONFIG"
## Write G4F models (HuggingChat backend)
#$REQ https://g4f.space/api/HuggingChat/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/HuggingChat,\n",$0}' >> "$TCONFIG"
## Write G4F models (OpenaiChat backend)
#$REQ https://g4f.space/api/OpenaiChat/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/OpenaiChat,\n",$0}' >> "$TCONFIG"
## Write G4F models (NVidia backend)
#$REQ https://g4f.space/api/nvidia/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/nvidia,\n",$0}' >> "$TCONFIG"
## Write G4F models (Ollama backend)
#$REQ https://g4f.space/api/ollama/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/ollama,\n",$0}' >> "$TCONFIG"
## Write G4F models (Groq backend)
#$REQ https://g4f.space/api/groq/models | jq -r '.data | .[] | .id' | awk '{printf "%s,-,https://g4f.space/api/groq,\n",$0}' >> "$TCONFIG"
# Write the config header
printf 'model,key,endpoint,extra\n' > "$CONFIG"
# Finalize the config
sort -u "$TCONFIG" >> "$CONFIG"
sort -u "$TCONFIG" | grep -v embed >> "$CONFIG"
rm -f "$TCONFIG"
exit 0