free-ollama

Instrumentation for surveying the open inference servers sitting on the public internet — and a proxy that routes to them. Two parts: graflex finds and classifies hosts; dyva serves them behind one API.

This is a research tool. It observes and measures — it never bypasses authentication, and an auth-required server is a recorded pass, not a target. A server exposing someone else's metered API key is documented statistically, never used.

graflex — find the servers

graflex queries FOFA for exposed services (Ollama, ComfyUI, a1111, vLLM, llama.cpp, SGLang, LM Studio, …), probes each for liveness, and classifies what it found. All actions take -a.

Crawling for new servers

# pull fresh candidates from FOFA, then probe only the new ones
./graflex.py -a fetch   -n ollama
./graflex.py -a check-new -n ollama

# or in one step
./graflex.py -a fetch-check -n ollama

# re-probe everything already known to be working (all services)
./graflex.py -a check-working -s all

-n names the service/query (e.g. ollama, comfyui, gradio). check-new probes only hosts not yet checked; check-all re-probes the lot.

Classifying

./graflex.py -a classify

Buckets each working host's models (image / edit / video / music / text …) into the survey files dyva reads.

dyva — use the servers

dyva is a managed proxy. Point any OpenAI-, Ollama-, ComfyUI-, a1111-, vLLM-, SGLang- or llama.cpp-compatible client at it; it races the discovered hosts, sticks to what works, and falls back automatically.

Ollama compatibility

dyva answers the Ollama and OpenAI wire protocols, so an existing client needs only its base URL changed to this proxy:

# Ollama-style
curl http://THIS-HOST:PORT/api/tags
curl http://THIS-HOST:PORT/api/chat -d '{"model":"gemma3","messages":[{"role":"user","content":"hi"}]}'

# OpenAI-style
curl http://THIS-HOST:PORT/v1/chat/completions -d '{"model":"qwen3","messages":[...]}'

Model names are routing patterns: partials and globs work (qwen*27b, abliterated), as do fallbacks (gemma?4/qwen3). One name covers every matching variant on every host. Media (image / edit / video / TTS) rides the OpenAI-ish endpoints under /v1/… and /sdapi/… — see the Swagger docs.

Adding a source (settings)

dyva's host list comes from one or more sources: the public discovery cache, or a private federation you point it at. Manage them in the dashboard Settings tab (paste a source URL), or from the CLI:

./dyva.py --source list
./dyva.py --source add https://example.com/hosts.json
./dyva.py --source disable graflex      # or: enable / disable all
./dyva.py --refresh                     # re-pull the caches
Privately-sourced host IPs are never disclosed publicly. Keep the public-discovery demo and the private-federation path both working.

Removing / pruning hosts

Host reputation lives in a table keyed by (host, capability). Inspect and prune it with --hosts — arguments narrow left to right, the verb comes last:

commanddoes
./dyva.py --hostssummary of every state, with counts
./dyva.py --hosts badthe keys marked bad
./dyva.py --hosts bad __tts__the hosts carrying that mark
./dyva.py --hosts bad __tts__ delclear those marks (removes the hosts)

Running it

uvx dyva            # or: ./dyva.py
./dyva.py -p 11434 -w 3 -t 30      # port, workers, timeout
./dyva.py -l                       # localhost-only inference