Skip to content

Point prime-agent at local Ollama - #89

Merged
technicalpickles merged 5 commits into
mainfrom
prime-ollama
Oct 24, 2026
Merged

technicalpickles merged 5 commits into
mainfrom
prime-ollama

Conversation

@technicalpickles

@technicalpickles technicalpickles commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

prime-agent has no built-in Ollama provider, so it had no model to talk to on this machine. This adds a custom one for the local Ollama server, and a script to keep its model list current.

  • prime/models.home.json defines an ollama provider at localhost:11434/v1. prime.sh links prime/models.<role>.json to ~/.prime/agent/models.json and skips roles without one, so the work machine (no local Ollama) is untouched.
  • Cloud models go through the local server's ollama signin, so there's no key in the repo. The apiKey field is required by prime-agent, so it's a dummy. A :cloud name works without an ollama pull.
  • bin/prime-models regenerates the list from ollama.com/v1/models: newest version of each model family, with its variants. --check sends each model a tiny request through the local server and drops the ones it rejects (retired models, /v1/systemone-only ones), so the committed list is only models that answered.
  • No safe change: safehouse's generated profile already allows outbound IP, so localhost works.

Test plan

  • Done: prime-models --check against a 0.40.9 server. Every listed model answered.
  • Done: DOTPICKLES_ROLE=work ./prime.sh skips models.json cleanly.
  • Not run yet: ./prime.sh on home, then prime-agent model list should show the ollama models.
  • Then a one-shot under the sandbox, e.g. safe prime-agent -p "reply with sandbox-ok" --provider ollama --model glm-5.3:cloud.
  • The list is wider than a hand-picked one (small variants like glm-5.3-flash, gpt-oss:20b). Trim the file, or add an exclude list to the script if that's too noisy.

🤖 Generated with Claude Code

technicalpickles and others added 4 commits October 23, 2026 10:57
prime-agent has no built-in Ollama provider. Add a custom one in
prime/models.json (localhost:11434/v1) and link it to
~/.prime/agent/models.json from prime.sh. Cloud models ride through the
local server's sign-in, so no key is stored. safehouse already allows
outbound IP, so localhost works under safe without a profile change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Drops the local gemma variant and the older cloud picks. Each id was
checked against the local server. qwen3.5, gemini-3-flash-preview and
devstral-small-2 are retired upstream, so they stay out.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Pulls the Ollama Cloud catalog, keeps the newest version of each model
family, and optionally validates each model through the local server so
retired ones drop out. Regenerates the committed list.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Rename prime/models.json to prime/models.home.json and have prime.sh link
prime/models.<role>.json, skipping roles without one. The work machine has
no local Ollama, so it shouldn't get a provider pointing at one.
bin/prime-models writes the home file. ADR 0065 notes it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@technicalpickles
technicalpickles enabled auto-merge (squash) October 24, 2026 13:35
@technicalpickles
technicalpickles merged commit 25e70b0 into main Oct 24, 2026
1 check passed
@technicalpickles
technicalpickles deleted the prime-ollama branch October 24, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant