A local LLM switchyard for macOS. One native app to see every model on your Mac (Ollama, LM Studio, MLX), and one OpenAI-compatible endpoint that routes each request to the right engine.
- Library — every model from Ollama and LM Studio in one table: source, parameters, quantization, size, capabilities. Group, sort, search, copy a model id with one click.
- In memory — what is loaded right now (including direct MLX servers), with RAM use, activity state and, when the engine exposes it, prompt-processing progress.
- Discover — search the Ollama, Hugging Face (GGUF/MLX) and LM Studio catalogs, filter by capability, sort by popularity, newest or name, then download.
- Endpoint — a background service on
http://127.0.0.1:41235/v1that speaks the OpenAI API and routes by themodelfield:- Ollama (
11434), LM Studio (1234), a running MLX server (8090) - Ollama cloud models, and free OpenRouter models (
:free) /v1/models,/v1/chat/completions,/v1/responses,/v1/embeddings,/health,/telemetry/v1/systemone(Jev/SystemOne body:state+ typedquestions) and/v1/decisions(OpenAI chat body +choices, answered as achat.completionwithconfidence/probabilities), modelclef→ the Clef MLX decision server (8091), which the gateway never starts
- Ollama (
The endpoint listens on loopback only and keeps running after the window is closed
(user LaunchAgent local.RailRouter.gateway).
- macOS 14 or later, Swift 5.9+ toolchain (Xcode or Command Line Tools)
- At least one of: Ollama, LM Studio, an MLX server
curl -fsSL https://raw.githubusercontent.com/Hugo291/RailRouter/main/install.sh | bashClones the repository to a temporary folder, builds, copies the app to /Applications and opens it.
Needs the Swift toolchain (xcode-select --install).
make test # built-in test harness, no model is loaded
make install # builds, signs ad-hoc, copies to /Applications
open /Applications/RailRouter.appcurl http://127.0.0.1:41235/v1/models
curl http://127.0.0.1:41235/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"<an id from /v1/models>","messages":[{"role":"user","content":"Hello"}]}'Point any OpenAI-compatible client (Codex, scripts, editors) at
http://127.0.0.1:41235/v1.
OpenRouter free models need an OpenRouter key, read from OPENROUTER_API_KEY or the
auth file used by opencode; the client's own Authorization header is never forwarded.
- Counters come from real responses, never from an estimate of text length.
- Only LM Studio exposes a precise prompt-processing percentage; Ollama does not.
- Requests that bypass the endpoint cannot be tracked.
- Discover groups model families; it does not guarantee identical weights or quantizations across engines.
- The telemetry log keeps ids, phases, dates and counters only — no prompts, answers, cookies or tokens.
