PanCode
All tutorials

Models and agents4 min read

Run PanCode on a local model

Connect a local server with no account or key, check what PanCode learned about it, and see what else to check if code must stay on your machine.

Written for
v0.9.0
Works in
Terminal
Basis
Documented workflow
Updated
Terminal: configure --list filtered to its Local HTTP section lists the runtimes for servers on your own machine: Generic Anthropic-compatible, Generic OpenAI-compatible, Lemonade, LiteLLM, llama.cpp, LM Studio, Ollama, SGLang and vLLM, each with whether it needs a key and how many connections use it. No local model server ran for this capture, so none is connected.
The local server runtimes PanCode can connect to. No local model ran for this capture. Terminal · v0.9.2
On this pageBefore you start Connect it Check what PanCode learned Ask something you can check Keep the work on your machine

You can run PanCode with a model on your own machine, with no account and no API key. This guide connects a local server, checks what PanCode learned about it, and shows what else to look at if your code must not leave the machine.

Before you start

  • A local server running, with a model that supports tool calling loaded.
  • PanCode installed, and a repository you know.

Connect it

Shell

cd /path/to/your/project
pancode configure

Choose Guided setup. A server already running on a default local port is listed first, under PanCode found a way to reach a model. Otherwise choose A model server or gateway and enter its address, or choose Connect by endpoint when you already know the URL. LM Studio commonly serves at http://localhost:1234, and Ollama at http://localhost:11434.

Setup may pick the model for you: a detected server comes with the first model it lists. Use /model afterwards to choose one that supports tool calling. Setup checks that the server is reachable, reads its model list, and sends one short test request before saving. It does not test tool calling, so the first real test comes next.

Check what PanCode learned

Shell

pancode connections --json
pancode doctor

In connections --json, contextWindowProvenance says where the window figure came from, such as a value the server reported or one you configured. A local server has no fallback number. If a figure looks wrong, set connections[].capabilities.contextWindow, or ollama.numCtx for Ollama, which is sent with every request.

Ask something you can check

Example

Read the build configuration and name the command that runs the tests. Run it and report the result. Do not edit files.

What you should see

Tool calls that really run, followed by an answer that matches your project. If the model writes out a command as text and never calls a tool, this model or server is not handling tool calls correctly, so try another before going further.

Keep the work on your machine

A local chat route does not by itself make the whole session local.

  • Memory uses the chat route when no memory connection is set, so it stays local unless you name another. Compaction does the same unless context.compaction.model names another.
  • System One is off by default. A hosted route would send data out.
  • Web tools, MCP servers, plugins, peers, and shell commands can still make network requests.

To enforce a boundary for named files, use information-flow rules.

Boundaries

  • Local inference costs no provider fee, though hardware and power still cost money. pancode usage report shows these calls as free.
  • Local servers vary in how they handle tool calls, cache, and long context. Expect to try more than one model.
  • Automatic discovery at startup checks default ports only, takes the first model listed, and uses a server it finds only after you say yes. Set a route with pancode configure to choose one.

By Anthony Kougkas · PanCode

Continue with the documentation