Settings can also point the explorer at a model server on your own workstation or at OpenRouter. With every backend, each model appears once in the model selector, and the + 4-Layer KB / Raw Chart Only toggle in the top bar selects the prompt variant.
The commands below are run from a local checkout of the Med Agent Hub and OpenClinAI workspace.
Local Med Agent Hub with llama-router (ports 18081 and 8077)
This option runs the full Med Agent Hub stack locally. Model files are downloaded on demand to ~/.cache/llama-router-models.
- Start the router: ./scripts/llama-router-up.sh
- Start Med Agent Hub: docker compose -f compose/openmrs-2.8-refapp.yml up -d med-agent-hub
- In Settings, select Local Med Agent Hub (:18081), or open
http://localhost:18081/wahs/demo.
LM Studio (port 1235 or 1234)
- Start the server with CORS enabled, ~/.lmstudio/bin/lms server start --port 1235 --cors, and set the context length to at least
16384.
- To reuse a model file that llama-router has already downloaded, import it without copying: ~/.lmstudio/bin/lms import -y -L --user-repo unsloth/gemma-4-12B-it-GGUF ~/.cache/llama-router-models/gemma-4-12b.gguf
- In Settings, select LM Studio.
llama-router (port 8077), Ollama (port 11434), or OpenRouter
- llama-router: run ./scripts/llama-router-up.sh and select llama-router (:8077) in Settings.
- Ollama: run OLLAMA_ORIGINS="*" OLLAMA_CONTEXT_LENGTH=16384 ollama serve and select Ollama (:11434) in Settings.
- OpenRouter: select OpenRouter in Settings, enter your
sk-or-v1-... key in the API key field, and select Apply.
- When the hosted page at
https://wahs-demo.openclinai.org connects to a local port, Chrome and Brave require the Local network access site permission, available from the address bar.