Repository navigation
Point prime-agent at local Ollama - #89
Merged
Merged
Conversation
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
enabled auto-merge (squash)
October 24, 2026 13:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsondefines anollamaprovider atlocalhost:11434/v1.prime.shlinksprime/models.<role>.jsonto~/.prime/agent/models.jsonand skips roles without one, so the work machine (no local Ollama) is untouched.ollama signin, so there's no key in the repo. TheapiKeyfield is required by prime-agent, so it's a dummy. A:cloudname works without anollama pull.bin/prime-modelsregenerates the list fromollama.com/v1/models: newest version of each model family, with its variants.--checksends 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.safechange: safehouse's generated profile already allows outbound IP, so localhost works.Test plan
prime-models --checkagainst a 0.40.9 server. Every listed model answered.DOTPICKLES_ROLE=work ./prime.shskips models.json cleanly../prime.shon home, thenprime-agent model listshould show theollamamodels.safe prime-agent -p "reply with sandbox-ok" --provider ollama --model glm-5.3:cloud.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