Skip to content
Docs
Request access

Local models

A model on your own machine uses the same openai-compatible provider, with no key. Every command on this page was run against a small local HTTP server that answers /v1/models and /v1/chat/completions on the loopback address; no real Ollama, vLLM, LM Studio, llama.cpp or TGI server was started for this page.

NuraMesh refuses a model address that is private, loopback or link-local unless the operator allows it. Set this in the environment of every command that calls a model (serve, run, worker, models test):

Terminal window
export NURAMESH_ALLOW_PRIVATE_NETWORK=1

Without it, a test fails like this (real output):

connection test for openai-compatible: FAILED [refused] in 0 ms: openai-compatible: refused: the host is a private, loopback or link-local address (or its name resolves to one); set NURAMESH_ALLOW_PRIVATE_NETWORK=1 on the server to allow a model on your own network; ledger entry 10

The choice is recorded in the ledger. http is allowed only to the literal 127.0.0.1 or [::1], never to the name localhost, never to another private address, and never with a key.

local-model sets up the connection, the catalog entry, the free price and your approval for qwen3:8b (or qwen3:4b with --model). --processing says where the host is: canada, global or region:<id>.

Terminal window
nuramesh init my-team
nuramesh models local-model --team my-team --human human:you --processing canada --yes
local-model profile, proposed for human:you:
connection openai-compatible/local http://127.0.0.1:11434/v1 (auth none)
catalog openai-compatible/local/qwen3:8b family qwen processing canada
price US$0 in and out, source 'declared free (local)'
approval by you, recorded in the ledger; no agent is assigned
openai-compatible/local/qwen3:8b is connected, priced as declared free (local) and approved by human:you

Check it and test the connection. The header rows of the two tables are left out; the columns are provider, endpoint, state, who set it, when and ledger entry for the first, and model, family, processing, state, data classes, price and connected for the last:

Terminal window
nuramesh models connections --team my-team
nuramesh models test openai-compatible --team my-team --human human:you --endpoint-id local
nuramesh models catalog --team my-team
openai-compatible/local http://127.0.0.1:11434/v1 active human:you 2026-11-17T17:04:14Z 2
connection test for openai-compatible: OK in 16 ms: openai-compatible: the endpoint answered; ledger entry 8
openai-compatible/local/qwen3:8b qwen canada approved synthetic,customer book yes

The test is one metadata request: no prompt and no spend.

Connect them with models connect, --auth none and the server’s address. The typical addresses are in the table below.

Server Typical address
Ollama http://127.0.0.1:11434/v1
vLLM http://127.0.0.1:8000/v1
LM Studio http://127.0.0.1:1234/v1
llama.cpp server http://127.0.0.1:8080/v1
Hugging Face TGI the address you map it to, ending in /v1
Terminal window
nuramesh models connect openai-compatible --team my-team --human human:you \
--endpoint-id local --endpoint http://127.0.0.1:8000/v1 --auth none --yes
nuramesh models test openai-compatible --team my-team --human human:you --endpoint-id local
connection for openai-compatible/local created; ledger entry 2
connection test for openai-compatible: OK in 26 ms: openai-compatible: the endpoint answered; ledger entry 5

The adapter’s tests also ran these servers’ documented answer shapes over a real loopback socket: extra fields (prompt_logprobs, timings, stats, system_fingerprint) are ignored, a missing usage records the cost as unknown, and a model name such as qwen3:8b is sent exactly as written. The catalog entry and price for a server other than the Ollama profile are added in the app (Models page, Catalog tab) or the API.

A price of exactly zero is allowed only as declared free (local) on an active loopback connection. --reason is required; without it the command exits 2.

Terminal window
nuramesh models price openai-compatible/local/qwen3:8b --team my-team --human human:you \
--free --effective-from 2026-11-18T00:00:00Z \
--source "declared free (local)" --reason "local model, same host" --yes
price for 'openai-compatible/local/qwen3:8b' recorded; ledger entry 12

The same command without --reason prints this and exits 2:

a reason (3 to 500 characters) is required

A loopback address can be a forwarder to a paid service, so a non-zero price is accepted too:

Terminal window
nuramesh models price openai-compatible/local/qwen3:8b --team my-team --human human:you \
--input-price 0.5 --output-price 1.5 --effective-from 2026-11-20T00:00:00Z \
--source "vendor price list" --reason "paid vendor behind the forwarder" --yes
price for 'openai-compatible/local/qwen3:8b' recorded; ledger entry 15
  • A model that spends its whole output budget thinking can answer with empty text and finish_reason length: raise max_output_tokens for that role.
  • A cold model load can exceed the default 300-second timeout; a timeout is never retried because it could be billed twice.
  • Small models can be weak at tool calling. Use a stronger model for roles that call tools or verify.

Was this page helpful?