Skip to content

Providers ​

The current client has three providers: local Ollama (the default), Chalupa (opt-in) and a local OpenAI-compatible server (opt-in, below). Selection is environment-only — there are no YAML provider profiles. See Configuration.

Local Ollama (default) ​

The default provider talks to Ollama on the local machine at OLLAMA_HOST, default 127.0.0.1:11434. Model, context, and thinking are set at launch with --model, --context, and --think — or LOCAL_AGENT_MODEL, LOCAL_AGENT_CONTEXT, LOCAL_AGENT_THINK. See Ollama models.

Chalupa (opt-in remote) ​

Chalupa places the model on remote hardware and exports a profile to the environment; chalupa exec supplies it. The client reads three variables:

VariableRole
LOCAL_AGENT_PROVIDER=chalupaSelect the Chalupa provider
LOCAL_AGENT_LOCAL_ONLY=falseLeave local-only explicitly; the client refuses to start Chalupa without it
LOCAL_AGENT_PROVIDER_CONFIGThe profile JSON supplied by chalupa exec

Chalupa keeps the model and context of its profile. Select them on the Chalupa side: the client rejects a --model that differs from the profile, and rejects --context outright — Chalupa negotiates the context itself. --think still applies.

When the profile carries keep_alive (a duration such as 30m), the client sends it with every chat, so the model stays loaded between turns for as long as Chalupa asks; without it the server's own default applies.

Without --session-db the conversation lives only in the process and ends with the launch. Arguments after -- reach the client, so chalupa launch local-agent -- --session-db ~/.local-agent/sessions.db keeps it in a database on your machine that --resume continues later. If a call with side effects was still running when the process ended, --resume refuses and names the --recover command that settles it first (see Sessions).

An Ollama cloud model (a tag that ends in :cloud or -cloud) is refused under a Chalupa profile, at startup and by /model: it runs on ollama.com, not on the GPU Chalupa provides, and your prompts would leave it.

Once Chalupa is active, prompts and tool receipts go to the remote endpoint. That is exactly what the explicit LOCAL_AGENT_LOCAL_ONLY=false acknowledges. See Safety and privacy.

Turn receipts ​

A headless run under a Chalupa profile can leave a receipt for chalupa inference report:

sh
chalupa exec -- local-agent -p "Fix the failing test" --approve-edits \
  --receipt receipt.json --run-id ci-42
chalupa inference report --config ./chalupa.yml \
  --file receipt.json --provider-id 123456789 --dry-run

The receipt is one JSON document (local-agent.turn-receipt.v1), written whole when the turn ends, also when it fails, and at once when a signal stops it. A file already at that path is removed as the run starts, so a run refused (for its flags, or without a Chalupa profile) leaves none. It holds counts and states only, with no prompt, reply, path or tool output:

  • the model and the context it ran with, and a run ID (--run-id, or a new UUID);
  • status: settled, canceled, failed or not_admitted (the model was not admitted before any inference: the host refused it, or did not answer the check), and stop_reason: completed, interrupted, not_admitted, step_limit, conversation_full, tunnel_lost or error;
  • prompt and output tokens summed over every model call of the turn, a task subagent's included, and truncated when a reply was cut at its length limit;
  • one status per tool call the turn made: ok only for a call that ran and succeeded; a denied, failed or unverified one is error. A subagent's own calls are not listed (its tokens are counted above);
  • timing (time to first token, load, prompt and output evaluation, total) only when Ollama reported every call's durations.

A local Ollama or OpenAI-compatible run has no receipt: --receipt is refused there, as it is for a model name Chalupa's receipt cannot carry.

OpenAI-compatible local servers (opt-in) ​

LOCAL_AGENT_PROVIDER=openai_local targets a local OpenAI-compatible server (llama.cpp, LM Studio, vLLM) over /v1/chat/completions with SSE streaming. The profile arrives via LOCAL_AGENT_PROVIDER_CONFIG:

json
{
  "type": "openai_local",
  "baseURL": "http://127.0.0.1:8080/v1",
  "model": "qwen3-4b",
  "context_size": 32768,
  "api_key": "optional-dummy-token"
}

baseURL must be loopback (127.0.0.1, localhost, ::1) unless LOCAL_AGENT_LOCAL_ONLY=false is set explicitly, the same boundary MCP endpoints use. api_key is optional: some local servers require a dummy bearer token. It travels as a bearer header on every request, so a profile with an api_key and a plain http baseURL to a host that is not loopback is refused at startup: use an https URL or drop the key. Plain http without a key (a server on your LAN) and http to loopback stay valid. The model is selected in the profile; a differing --model is refused, while --context behaves as with local Ollama (without it the size stays 16384; only local Ollama plans one). On startup the client checks the model against GET {baseURL}/models; servers that do not implement the endpoint (404) skip the check with a status note.

Where the prompt goes ​

The Tuimark client's top bar says whether prompts leave this machine. Wide terminals show the provider: Ollama / loopback, Chalupa / remote, or OpenAI-compatible / local (or / remote). Below 111 columns, LOCAL or REMOTE takes its place, REMOTE in the accent color, and below 61 columns the model name gives way to it. Chalupa is remote even though its URL is on loopback: that URL is a tunnel. A server on loopback is local, and a server on any other host, a LAN machine included, is remote.

Retries ​

A request to the model, and the metadata reads at startup (Ollama's /api/tags and /api/show, an OpenAI-compatible server's /models), is sent again when the connection is refused or reset, or the server answers 429, 502, 503 or 504. It is tried at most twice more, after 250 ms and then 500 ms, or after the server's Retry-After when it gives one. A Retry-After longer than 10 seconds is not waited for: that answer stands. A timeout or a cancel (esc) is final, and a reply that has started streaming is never replayed. The /provider check and the background /api/ps look make one attempt.

Streamed replies from OpenAI-compatible servers are read whether their lines end in LF, CRLF or CR.

Not in the current client ​

  • No provider configuration file. Profiles are not written in YAML; there are no provider settings beyond the flags and variables above.
  • No cloud OpenAI endpoints. LOCAL_AGENT_PROVIDER accepts ollama, chalupa, and openai_local (loopback by default); anything else fails at startup.

Local-first by default. Approval-gated by design.