A stdlib pre-router in front of Ollama with LiteLLM backend: - auto model selection by content/tools/modality, with fallbacks - OpenAI /v1, Anthropic /v1/messages, and Ollama-native /api/* endpoints - Whisper-shaped /v1/audio/transcriptions + in-chat audio - key-based fleet policies (e.g. force a client onto uncensored models) - optional Bearer auth; launchd/systemd service install - benchmark harnesses (speed, quality, agentic tool use) with sample results Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
40 lines
1.2 KiB
Bash
Executable File
40 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Pull a model fleet into Ollama. EDIT the MODELS list to taste, then run.
|
|
# Continues past failures; prints a summary. Ollama resumes partial downloads.
|
|
#
|
|
# The names here must line up with the routing map in router.py (M / UNCENSORED).
|
|
# If you change models, update router.py accordingly (see docs/ROUTING.md).
|
|
set -u
|
|
|
|
MODELS=(
|
|
# --- general / small ---
|
|
"qwen3:8b"
|
|
"qwen3:14b"
|
|
# --- reasoning / agentic ---
|
|
"qwen3.6:35b-a3b"
|
|
"gpt-oss:20b"
|
|
"glm-4.7-flash"
|
|
# --- coding ---
|
|
"qwen3-coder:30b"
|
|
# --- vision / OCR ---
|
|
"qwen3-vl:8b"
|
|
"qwen3-vl:30b-a3b-instruct"
|
|
# --- multimodal (vision + audio) ---
|
|
"gemma4:e4b" # ROUTER_AUDIO_MODEL default — needed for /v1/audio/*
|
|
"gemma4:12b"
|
|
"gemma4:26b"
|
|
|
|
# --- example: a GGUF straight from Hugging Face (see docs/ROUTING.md) ---
|
|
# "hf.co/USER/REPO:Q4_K_M"
|
|
)
|
|
|
|
ok=(); fail=(); i=0; total=${#MODELS[@]}
|
|
for m in "${MODELS[@]}"; do
|
|
i=$((i+1))
|
|
echo "=== [$i/$total] pulling $m ==="
|
|
if ollama pull "$m"; then ok+=("$m"); else echo "!! failed: $m"; fail+=("$m"); fi
|
|
done
|
|
|
|
echo ""; echo "done. ${#ok[@]}/$total succeeded."
|
|
[ ${#fail[@]} -gt 0 ] && { echo "failed:"; printf ' - %s\n' "${fail[@]}"; }
|