Where the AI comes from
One switch decides which model every app on your bench answers with
1Overview
One setting — "Which AI answers" — that every app on the bench inherits through a LiteLLM gateway.
Every app on the bench asks one gateway for a model called `default`. Change what `default` means and n8n, AnythingLLM, Hermes and everything you install later follow — no app is reconfigured, no key is pasted twice. This chapter walks the four honest options: the model on your own disk, a model on another machine you own, an EU-hosted router, and a global one — with what each costs and where your text goes. → `bench-model` is the model that ships with the bench; `litellm` is the gateway on a server you administer.
A gateway in the middle is the whole trick. Each app is configured once, at install, to talk to `http://litellm:4000/v1` and ask for a model called `default`. What `default` resolves to is one line of configuration the dashboard rewrites for you. That is why swapping a 3-billion-parameter model on your laptop for a frontier model in Frankfurt takes one click and breaks nothing: the apps never knew which model they were talking to. It is also the pattern you would use on a real server — the same LiteLLM, the same idea, one size up.
When the bench model is too small for a task, when you want to work offline, or when a document must not leave the EU.
The gateway serves two names: `default` for the apps, and `hermes` so the agent can be pointed somewhere of its own.
OpenRouter routes outside the EU unless you are on its enterprise plan. Requesty and EUrouter process inside it. For university data that sentence is the decision.
The bench model and LM Studio cost nothing but your own hardware. Routers charge the provider price plus a small markup — a seminar afternoon is cents.
2Lessons 3
2.1 One gateway, one name, every app
LiteLLM is a small server that speaks the OpenAI API and forwards to whatever actually answers. On the bench it runs on port 4000 and every app points at it.
Understand why one switch can change the AI for five apps at once.
curl -s -H "Authorization: Bearer $LITELLM_MASTER_KEY" http://localhost:4000/v1/modelsin a terminal, with the key from the .env in your HeidelbergBench folder. It lists what the gateway serves.
- Two names, always.
defaultis what n8n, AnythingLLM and the rest ask for.hermesexists so the agent can use a different model without disturbing anything else. - The apps are configured once. Their
.envsaysLLM_BASE_URL=http://litellm:4000/v1. Nothing in them names a model provider. - So switching is one file. The dashboard rewrites
litellm/config.yamland restarts the gateway — a few seconds, and no app notices more than a blip.
- You'll see A JSON list with two entries: default and hermes.
- Takeaway Configure the apps once against a name; move the name. That is what a gateway buys you.
2.2 The four options, and what each one costs you
Do this first One gateway, one name, every app
Pick a provider for a real task instead of always taking the default.
- The bench model (qwen2.5:3b, on your disk). Free, offline, private. Small: it summarises, extracts, drafts and demonstrates. It will not reason through a hard problem.
- LM Studio, on your machine or a lab machine. Free, and as big as the hardware allows. The bench asks the address what it serves rather than guessing a model name.
- Requesty or EUrouter. Frontier models, processed in the EU, paid per token. This is the answer when quality matters and the data is sensitive.
- OpenRouter. The widest selection and usually the cheapest, but routing leaves the EU unless you are on its enterprise plan.
- You'll see The dashboard names your choice under "Which AI answers", and the model line changes on every app tile.
- Takeaway Small-and-local, big-and-yours, big-and-EU, big-and-global. Almost every real choice is one of those four.
- Check A seminar analyses interview transcripts that may not leave the university. Which two options remain?
- Cost Local: electricity. EU routers: provider price plus roughly 5%. Nothing is charged without a key you pasted yourself.
2.3 Point the bench at a model on another machine
A laptop is a weak place to run a model and a fine place to run apps. If there is a workstation, a lab machine or a GPU box on your network, the bench can use its model while everything else stays on your laptop.
Do this first The four options, and what each one costs you
Use a stronger model without paying anyone, by borrowing a machine you already have.
- On the other machine: run LM Studio, load a model, and turn on its local server. Note the address it prints, usually
http://.:1234/v1 - On the bench: Change under "Which AI answers", choose LM Studio, and give that address. The setup asks it what models it serves and takes the first one — a name nobody has to type correctly.
- If it is the same machine, the address from inside a container is
http://host.docker.internal:1234/v1, notlocalhost— localhost inside a container is the container. - Check it took. The tiles now say that model, and one question in "Ask the course" comes back noticeably faster or better.
- You'll see Every app tile shows the new model name within a few seconds of the switch.
- Takeaway The gateway does not care where the model runs. Neither should your apps.
💬 Discuss this chapter
Ask, share, or report — over on the Heidelberg AI community forum.