From aa94c87ee811c5e12d956b80c528ce362ce58eea Mon Sep 17 00:00:00 2001 From: WebX11 SysOp Date: Thu, 5 Nov 2026 22:14:52 +0100 Subject: docs(newos4): install pi + point it at Ollama; fix dead /about/ link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Install is npm (node>=22.19). Ollama wiring is two files under ~/.pi/agent: models.json (baseUrl http://localhost:11434/v1, api openai-completions, model list) and settings.json (defaultProvider/defaultModel). Documents the trap that a pulled model must also be declared — undeclared gives 'Model not found', which reads like a connection failure. Both paths verified on this host: declared coder:latest -> 'LOCAL OK', undeclared llama3.2:latest -> error. The two /about/ links pointed at the host root, where nothing exists; the repo page is /newos4/about/. --- docs/usage.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) (limited to 'docs/usage.html') diff --git a/docs/usage.html b/docs/usage.html index 6d770d0..7d71b1c 100644 --- a/docs/usage.html +++ b/docs/usage.html @@ -66,7 +66,7 @@ no key, no token.

Latest tagv4.6.146 — see refs Writesnone. git-receive-pack answers 403; there is no SSH endpoint Private datastripped from every commit before publication — see Scope - Reading itrendered README · file tree · history + Reading itrendered README · file tree · history

Linux

@@ -172,6 +172,55 @@ also clone a public HTTPS repository without an account.

only documented flags, treats the mirror as read-only, and was run against pi 0.80.3 before being written down.

+

Install

+
node -v                       # needs Node >= 22.19.0
+npm install -g @earendil-works/pi-coding-agent
+pi --version                  # e.g. 1.5.0
+

That package installs the pi binary +(bin: pi → dist/bundle/cli.js). A system-wide install lands in +/usr/lib/node_modules/@earendil-works/pi-coding-agent; a user install needs +~/.local/bin on PATH.

+ +

Point it at Ollama

+

Ollama speaks the OpenAI wire format on http://127.0.0.1:11434/v1 by default, which is exactly +what pi expects. Two files under ~/.pi/agent/ do the whole job:

+
// ~/.pi/agent/models.json
+{
+  "providers": {
+    "ollama": {
+      "baseUrl": "http://localhost:11434/v1",
+      "api": "openai-completions",
+      "apiKey": "ollama",
+      "compat": { "supportsDeveloperRole": false, "supportsReasoningEffort": false },
+      "models": [
+        { "id": "llama3.2:latest", "name": "Llama 3.2 (local)" },
+        { "id": "qwen2.5-coder:7b", "name": "Qwen2.5 Coder 7B (local)" }
+      ]
+    }
+  }
+}
+
// ~/.pi/agent/settings.json
+{ "defaultProvider": "ollama", "defaultModel": "llama3.2:latest" }
+

baseUrl points at your daemon — use +http://localhost:11434/v1 for a local Ollama, or your own host:port. apiKey must be a +non-empty string because the client sends it as a bearer token; Ollama ignores the value. The two +compat flags off are what this provider needs.

+ +
+ Pulling a model in Ollama is not enough. It must also be listed under + models[]. Undeclared, pi --model llama3.2:latest fails with + Error: Model "llama3.2:latest" not found. Use --list-models — that is the single most common + configuration mistake and it looks like a connection problem. +
+ +

Verify the wiring

+
pi --list-models | grep ollama           # your declared ids, with context limits
+ollama list                              # what the daemon actually serves
+pi -p --no-session --no-tools --model llama3.2:latest "Reply with exactly: LOCAL OK"
+

A reply of LOCAL OK means the whole chain works: +config → local daemon → model. Ids ending in -cloud are relayed by Ollama to +ollama.com and need an ollama signin; local tags have no suffix.

+

1. One-shot: analyse a file, print an answer, exit

git clone --depth 1 https://newos.webx11.duckdns.org/newos4.git /tmp/newos4
 
@@ -275,7 +324,7 @@ repository that cannot accept them.

-- cgit v1.2.3