I still want the expensive model in the chair. I do not want it typing a hundred pytest functions. That work is obvious, bounded, and cheap to throw away if it is wrong. A 9B–24B model on a private GPU can do it. The trick is getting Cursor, Copilot, or Claude to use that GPU without publishing the GPU to the internet.
slm-setup is the setup I am using for that split. The premium agent stays the planner and the reviewer. A local process on the workstation talks to Ollama. The local model never becomes “the model in the picker.” It is a handful of tools.
The thing that does not work
Cursor can override an OpenAI-compatible base URL. Those requests are assembled on Cursor’s servers. A localhost or home-LAN Ollama URL is invisible from there unless you punch a hole to the public internet. I will not do that. The same override is also global — it fights the premium models I actually want for planning.
Copilot’s GitHub-hosted agent and Claude’s remote sessions have the same problem. They do not sit on a private LAN. This bridge is for the machine in front of you: desktop Cursor, IDE Copilot Agent, local Claude Code. Cloud agents are out.
Who does what
If the shape of the answer is obvious — tests, a rename, a summary, a first-pass review — I ask the local tools. If the problem is architectural, cross-system, or security-sensitive, I keep it on the premium model. If the local answer is thin or wrong, the premium model edits it. I expect to spend some premium tokens deciding and reviewing. I am trying not to spend them emitting the artifact.
you + premium agent
│ plan, pick files, review
▼
local-coding-slm (stdio, on the workstation)
│ HTTP to localhost or a private LAN
▼
Ollama
fast model stronger model
(everyday coding) (harder local work)
The IDE and the MCP server live on the workstation. Ollama lives wherever the GPU is. Same machine is fine. Two machines on one private network is fine. The URL never goes in git.
What the local model is for
One server name: local-coding-slm. It does not run shell commands, does not write files, and does not open ports other than Ollama. It returns text — code, a diff, or markdown — and I decide whether to apply it. I send a few files, not the repo.
The tools are boring on purpose: write code, refactor, generate tests, explain, review, and check that Ollama is up. Each one has a short fixed system prompt. The test tool is told to write tests only. If the request is fuzzy, it should ask instead of inventing production changes.
The starter pair is a fast everyday model (qwen3.5:9b) and a stronger coding model (devstral-small-2). Use fast by default. Escalate only when the cheap answer is not good enough. A 16 GB NVIDIA GPU is enough for both. Keep context at 16K–32K even if a model advertises 256K. VRAM is the scarce resource, not the advertised window.
What is in the repo
The public repo is the spec plus a running stdio server, not a sketch. You get unit tests, a wrapper that starts the server and loads a local .env, and templates for Cursor, VS Code Copilot, and Claude Code. The real Ollama URL stays in that environment file. It is never committed.
Treat local output as untrusted. Apply it, trim it, or throw it away. The premium agent already has the repo; the SLM only sees the snippets you send. There is no automatic classifier that decides which model to call. That is still a paragraph in the project instructions: mechanical work goes to the local tools, everything else stays premium.
Same machine or two machines on a private LAN both work. Cloud agents do not. They cannot see a private GPU, and the repo does not try to make them. OpenRouter is out of scope. So is pointing the IDE at Ollama as if it were OpenAI.
If you already pay for a premium coding agent and you have a GPU that is not on the public internet, this is the shape to start from. Clone it, point .env at your Ollama, and see whether the small model is good enough for the mechanical work you actually do.
Source: github.com/jmjava/slm-setup — start with spec.md
git clone git@github.com:jmjava/slm-setup.git