@senior: issue #29 — derive Ollama Cloud provider models from the agent registry

The agent→model registry in route.sh is now the single source of truth for
Ollama Cloud model IDs. route.sh publishes the full registry as a step
output (agents=...), and install-opencode.sh derives the ollama-cloud
provider models: map from it (unprefixed IDs), instead of hardcoding a
second copy. The two files can no longer drift silently — adding/changing
a cloud model in the registry automatically updates the provider config.

- route.sh: emit agents=$(jq -c '.' /tmp/agents.json) to GITHUB_OUTPUT
- agent.yml: pass steps.prep.outputs.agents as AGENTS env to install-opencode.sh
- install-opencode.sh: derive CMODELS from $AGENTS; // {} keeps it valid
  when no agent uses an ollama-cloud model (non-ollama repos)
This commit is contained in:
2026-07-04 07:12:15 +00:00
parent b3deee7412
commit 8c17aed1fc
3 changed files with 14 additions and 4 deletions
+1
View File
@@ -78,6 +78,7 @@ jobs:
OLLAMA_CLOUD_API_KEY: ${{ secrets.OLLAMA_CLOUD_API_KEY }}
NAME: ${{ steps.prep.outputs.name }}
SKILLS: ${{ steps.prep.outputs.skills }} # JSON array of skills this agent may load
AGENTS: ${{ steps.prep.outputs.agents }} # full agent registry — single source of truth for model IDs
run: bash "$SCRIPTS/install-opencode.sh"
- name: Set up read-only SSH alias `node1` (+ opencode skill so the agent actually knows about it)