Make the agent→model registry in route.sh the single source of truth for Ollama Cloud model IDs, so the provider config in install-opencode.sh can no longer drift from it silently. route.sh now publishes the full registry as a step output; install-opencode.sh derives the ollama-cloud provider's models: map from it (stripping the ollama-cloud/ prefix). No agent's model changed, and the routing/trigger-gate logic is untouched.
agent.yml: pass steps.prep.outputs.agents as AGENTS env to the install-opencode step (mirrors the existing SKILLS pattern).
install-opencode.sh: derive CMODELS from $AGENTS and use it as the ollama-cloud provider's models: map; // {} keeps the JSON valid when no agent uses an ollama-cloud model (e.g. an all-anthropic caller repo). Removed the now-redundant hardcoded model list.
## Summary
Make the agent→model registry in `route.sh` the single source of truth for Ollama Cloud model IDs, so the provider config in `install-opencode.sh` can no longer drift from it silently. `route.sh` now publishes the full registry as a step output; `install-opencode.sh` derives the `ollama-cloud` provider's `models:` map from it (stripping the `ollama-cloud/` prefix). No agent's model changed, and the routing/trigger-gate logic is untouched.
## Changes
- `route.sh`: emit `agents=$(jq -c '.' /tmp/agents.json)` to `GITHUB_OUTPUT` (single-line, valid step-output value).
- `agent.yml`: pass `steps.prep.outputs.agents` as `AGENTS` env to the install-opencode step (mirrors the existing `SKILLS` pattern).
- `install-opencode.sh`: derive `CMODELS` from `$AGENTS` and use it as the `ollama-cloud` provider's `models:` map; `// {}` keeps the JSON valid when no agent uses an ollama-cloud model (e.g. an all-anthropic caller repo). Removed the now-redundant hardcoded model list.
---
Resolves #29 · 🤖 @senior
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)
🔧read: .gitea/workflows/scripts/route.sh 🔧read: .gitea/workflows/scripts/install-opencode.sh 🔧read: .gitea/workflows/agent.yml 🔧bash: cd /workspace/ffaerber/agents && git log --oneline -15 && echo "---BRANCH---" && git branch --show-current && echo "---STATUS---" && git status --short 🔧bash: cd /workspace/ffaerber/agents && cat > /tmp/agents.json <<'JSON' { "pm": {"model":"ollama-cloud/gemma4:cloud","vision":true}, "junior": {"model":"ollama-cloud/kimi-k2.7-code:cloud","vision":false}, "senior": {"model":"ollama-cloud… 💬 Let me verify my approach with the actual data before editing. 🔧bash: cd /workspace/ffaerber/agents echo "--- test1: build object ---" jq -c '[.[].model | select(startswith("ollama-cloud/")) | sub("^ollama-cloud/";"")] | unique | map({(.):{}}) | add' /tmp/agents.json echo "--- test2 empty ---" echo '{"x":{"mo… 🔧bash: cd /workspace/ffaerber/agents echo "--- test empty with coalesce ---" echo '{"x":{"model":"anthropic/foo"}}' | jq -c '([.[].model | select(startswith("ollama-cloud/")) | sub("^ollama-cloud/";"")] | unique | map({(.):{}}) | add) // {}' echo … 🔧edit: .gitea/workflows/scripts/route.sh 💬 Verified. // {} handles the empty case so non-ollama repos don't break. Now the edits — single source of truth: route.sh owns the registry, install-opencode.sh derives the cloud provider models: map from it (via a step output, matching the existing SKILLS precedent). 🔧edit: .gitea/workflows/agent.yml 🔧edit: .gitea/workflows/scripts/install-opencode.sh 🔧read: .gitea/workflows/scripts/install-opencode.sh 💬 That edit came out garbled with a leftover $AGENTS_FILE reference. Let me fix it. 🔧edit: .gitea/workflows/scripts/install-opencode.sh 🔧edit: .gitea/workflows/scripts/install-opencode.sh 🔧edit: .gitea/workflows/scripts/install-opencode.sh 💬 Also simplify the verbose comment now that the code is one line: 🔧read: .gitea/workflows/scripts/install-opencode.sh 🔧read: .gitea/workflows/scripts/route.sh 💬 Now let me verify the final files and end-to-end that the generated config matches the old hardcoded one: 🔧bash: `cd /workspace/ffaerber/agents
CMODELS=$(printf '%s' "$AGENTS" | jq -c '([.[].model | select(st…💬 Now an end-to-end simulation comparing the generated provider config to the old hardcoded one: 🔧 **bash**:cd /workspace/ffaerber/agents && bash -n .gitea/workflows/scripts/route.sh && echo "route.sh: OK" && bash -n .gitea/workflows/scripts/install-opencode.sh && echo "install-opencode.sh: OK"
echo "--- AGENTS line length check (GITHUB_OUTPUT mu…💬 Derived models exactly match the old hardcoded set. Empty-case yields{}. Now check for shell syntax issues with bash -n: 💬 Both scripts parse cleanly; the agents=output line is single-line (319 chars, no newlines) so it's a valid GITHUB_OUTPUT value. Let me also confirm there's no other consumer of the old hardcoded model list, then commit and push. 🔧 **grep**:gemma4|kimi-k2|minimax-m3|glm-5.2🔧 **bash**:cd /workspace/ffaerber/agents && git add .gitea/workflows/scripts/route.sh .gitea/workflows/scripts/install-opencode.sh .gitea/workflows/agent.yml && git status --short && echo "---DIFF STAT---" && git diff --cached --stat💬 Only the registry in route.sh now names the cloud model IDs — exactly the single source of truth we wanted. Committing and pushing. 🔧 **bash**:cd /workspace/ffaerber/agents && git commit -m "@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 pu…💬 Pushed toai/issue-29. The change makes route.sh's agent registry the single source of truth for Ollama Cloud model IDs: it now publishes the registry as a step output, and install-opencode.sh derives the provider models:map from it (unprefixed IDs), so the two files can no longer drift. Verified the derived set exactly matches the previously-hardcoded models, and that the// {}` empty-case keeps the config valid for repos where no agent uses an ollama-cloud model.
BEGIN_PR_DESCRIPTION
Summary
Make the agent→model registry in route.sh the single source of truth for Ollama Cloud model IDs, so the provider config in install-opencode.sh can no longer drift from it silently. route.sh now publishes the full registry as a step output; install-opencode.sh derives the ollama-cloud provider's models: map from it (stripping the ollama-cloud/ prefix). No agent's model changed, and the routing/trigger-gate logic is untouched.
agent.yml: pass steps.prep.outputs.agents as AGENTS env to the install-opencode step (mirrors the existing SKILLS pattern).
install-opencode.sh: derive CMODELS from $AGENTS and use it as the ollama-cloud provider's models: map; // {} keeps the JSON valid when no agent uses an ollama-cloud model (e.g. an all-anthropic caller repo). Removed the now-redundant hardcoded model list.
END_PR_DESCRIPTION
🤖 **@senior** — activity log (60 entries):
<details>
<summary>tool calls & reasoning</summary>
🔧 **read**: `.gitea/workflows/scripts/route.sh`
🔧 **read**: `.gitea/workflows/scripts/install-opencode.sh`
🔧 **read**: `.gitea/workflows/agent.yml`
🔧 **bash**: `cd /workspace/ffaerber/agents && git log --oneline -15 && echo "---BRANCH---" && git branch --show-current && echo "---STATUS---" && git status --short`
🔧 **bash**: `cd /workspace/ffaerber/agents && cat > /tmp/agents.json <<'JSON'
{
"pm": {"model":"ollama-cloud/gemma4:cloud","vision":true},
"junior": {"model":"ollama-cloud/kimi-k2.7-code:cloud","vision":false},
"senior": {"model":"ollama-cloud…`
💬 Let me verify my approach with the actual data before editing.
🔧 **bash**: `cd /workspace/ffaerber/agents
echo "--- test1: build object ---"
jq -c '[.[].model | select(startswith("ollama-cloud/")) | sub("^ollama-cloud/";"")] | unique | map({(.):{}}) | add' /tmp/agents.json
echo "--- test2 empty ---"
echo '{"x":{"mo…`
🔧 **bash**: `cd /workspace/ffaerber/agents
echo "--- test empty with coalesce ---"
echo '{"x":{"model":"anthropic/foo"}}' | jq -c '([.[].model | select(startswith("ollama-cloud/")) | sub("^ollama-cloud/";"")] | unique | map({(.):{}}) | add) // {}'
echo …`
🔧 **edit**: `.gitea/workflows/scripts/route.sh`
💬 Verified. `// {}` handles the empty case so non-ollama repos don't break. Now the edits — single source of truth: route.sh owns the registry, install-opencode.sh derives the cloud provider `models:` map from it (via a step output, matching the existing `SKILLS` precedent).
🔧 **edit**: `.gitea/workflows/agent.yml`
🔧 **edit**: `.gitea/workflows/scripts/install-opencode.sh`
🔧 **read**: `.gitea/workflows/scripts/install-opencode.sh`
💬 That edit came out garbled with a leftover `$AGENTS_FILE` reference. Let me fix it.
🔧 **edit**: `.gitea/workflows/scripts/install-opencode.sh`
🔧 **edit**: `.gitea/workflows/scripts/install-opencode.sh`
🔧 **edit**: `.gitea/workflows/scripts/install-opencode.sh`
💬 Also simplify the verbose comment now that the code is one line:
🔧 **read**: `.gitea/workflows/scripts/install-opencode.sh`
🔧 **read**: `.gitea/workflows/scripts/route.sh`
💬 Now let me verify the final files and end-to-end that the generated config matches the old hardcoded one:
🔧 **bash**: `cd /workspace/ffaerber/agents
# Simulate route.sh's agents.json output
AGENTS=$(jq -c '.' /tmp/agents.json)
echo "AGENTS=$AGENTS"
# Run the derivation from install-opencode.sh
CMODELS=$(printf '%s' "$AGENTS" | jq -c '([.[].model | select(st…`
💬 Now an end-to-end simulation comparing the generated provider config to the old hardcoded one:
🔧 **bash**: `cd /workspace/ffaerber/agents && bash -n .gitea/workflows/scripts/route.sh && echo "route.sh: OK" && bash -n .gitea/workflows/scripts/install-opencode.sh && echo "install-opencode.sh: OK"
echo "--- AGENTS line length check (GITHUB_OUTPUT mu…`
💬 Derived models exactly match the old hardcoded set. Empty-case yields `{}`. Now check for shell syntax issues with `bash -n`:
💬 Both scripts parse cleanly; the `agents=` output line is single-line (319 chars, no newlines) so it's a valid GITHUB_OUTPUT value. Let me also confirm there's no other consumer of the old hardcoded model list, then commit and push.
🔧 **grep**: `gemma4|kimi-k2|minimax-m3|glm-5\.2`
🔧 **bash**: `cd /workspace/ffaerber/agents && git add .gitea/workflows/scripts/route.sh .gitea/workflows/scripts/install-opencode.sh .gitea/workflows/agent.yml && git status --short && echo "---DIFF STAT---" && git diff --cached --stat`
💬 Only the registry in route.sh now names the cloud model IDs — exactly the single source of truth we wanted. Committing and pushing.
🔧 **bash**: `cd /workspace/ffaerber/agents && git commit -m "@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 pu…`
💬 Pushed to `ai/issue-29`. The change makes route.sh's agent registry the single source of truth for Ollama Cloud model IDs: it now publishes the registry as a step output, and install-opencode.sh derives the provider `models:` map from it (unprefixed IDs), so the two files can no longer drift. Verified the derived set exactly matches the previously-hardcoded models, and that the `// {}` empty-case keeps the config valid for repos where no agent uses an ollama-cloud model.
BEGIN_PR_DESCRIPTION
## Summary
Make the agent→model registry in `route.sh` the single source of truth for Ollama Cloud model IDs, so the provider config in `install-opencode.sh` can no longer drift from it silently. `route.sh` now publishes the full registry as a step output; `install-opencode.sh` derives the `ollama-cloud` provider's `models:` map from it (stripping the `ollama-cloud/` prefix). No agent's model changed, and the routing/trigger-gate logic is untouched.
## Changes
- `route.sh`: emit `agents=$(jq -c '.' /tmp/agents.json)` to `GITHUB_OUTPUT` (single-line, valid step-output value).
- `agent.yml`: pass `steps.prep.outputs.agents` as `AGENTS` env to the install-opencode step (mirrors the existing `SKILLS` pattern).
- `install-opencode.sh`: derive `CMODELS` from `$AGENTS` and use it as the `ollama-cloud` provider's `models:` map; `// {}` keeps the JSON valid when no agent uses an ollama-cloud model (e.g. an all-anthropic caller repo). Removed the now-redundant hardcoded model list.
END_PR_DESCRIPTION
</details>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Make the agent→model registry in
route.shthe single source of truth for Ollama Cloud model IDs, so the provider config ininstall-opencode.shcan no longer drift from it silently.route.shnow publishes the full registry as a step output;install-opencode.shderives theollama-cloudprovider'smodels:map from it (stripping theollama-cloud/prefix). No agent's model changed, and the routing/trigger-gate logic is untouched.Changes
route.sh: emitagents=$(jq -c '.' /tmp/agents.json)toGITHUB_OUTPUT(single-line, valid step-output value).agent.yml: passsteps.prep.outputs.agentsasAGENTSenv to the install-opencode step (mirrors the existingSKILLSpattern).install-opencode.sh: deriveCMODELSfrom$AGENTSand use it as theollama-cloudprovider'smodels:map;// {}keeps the JSON valid when no agent uses an ollama-cloud model (e.g. an all-anthropic caller repo). Removed the now-redundant hardcoded model list.Resolves #29 · 🤖 @senior
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)🤖 @senior — ✅ PR ready for review — @ffaerber please review & merge:
🤖 @senior — activity log (60 entries):
tool calls & reasoning
🔧 read:
.gitea/workflows/scripts/route.sh🔧 read:
.gitea/workflows/scripts/install-opencode.sh🔧 read:
.gitea/workflows/agent.yml🔧 bash:
cd /workspace/ffaerber/agents && git log --oneline -15 && echo "---BRANCH---" && git branch --show-current && echo "---STATUS---" && git status --short🔧 bash:
cd /workspace/ffaerber/agents && cat > /tmp/agents.json <<'JSON' { "pm": {"model":"ollama-cloud/gemma4:cloud","vision":true}, "junior": {"model":"ollama-cloud/kimi-k2.7-code:cloud","vision":false}, "senior": {"model":"ollama-cloud…💬 Let me verify my approach with the actual data before editing.
🔧 bash:
cd /workspace/ffaerber/agents echo "--- test1: build object ---" jq -c '[.[].model | select(startswith("ollama-cloud/")) | sub("^ollama-cloud/";"")] | unique | map({(.):{}}) | add' /tmp/agents.json echo "--- test2 empty ---" echo '{"x":{"mo…🔧 bash:
cd /workspace/ffaerber/agents echo "--- test empty with coalesce ---" echo '{"x":{"model":"anthropic/foo"}}' | jq -c '([.[].model | select(startswith("ollama-cloud/")) | sub("^ollama-cloud/";"")] | unique | map({(.):{}}) | add) // {}' echo …🔧 edit:
.gitea/workflows/scripts/route.sh💬 Verified.
// {}handles the empty case so non-ollama repos don't break. Now the edits — single source of truth: route.sh owns the registry, install-opencode.sh derives the cloud providermodels:map from it (via a step output, matching the existingSKILLSprecedent).🔧 edit:
.gitea/workflows/agent.yml🔧 edit:
.gitea/workflows/scripts/install-opencode.sh🔧 read:
.gitea/workflows/scripts/install-opencode.sh💬 That edit came out garbled with a leftover
$AGENTS_FILEreference. Let me fix it.🔧 edit:
.gitea/workflows/scripts/install-opencode.sh🔧 edit:
.gitea/workflows/scripts/install-opencode.sh🔧 edit:
.gitea/workflows/scripts/install-opencode.sh💬 Also simplify the verbose comment now that the code is one line:
🔧 read:
.gitea/workflows/scripts/install-opencode.sh🔧 read:
.gitea/workflows/scripts/route.sh💬 Now let me verify the final files and end-to-end that the generated config matches the old hardcoded one:
🔧 bash: `cd /workspace/ffaerber/agents
Simulate route.sh's agents.json output
AGENTS=$(jq -c '.' /tmp/agents.json)
echo "AGENTS=$AGENTS"
Run the derivation from install-opencode.sh
CMODELS=$(printf '%s' "$AGENTS" | jq -c '([.[].model | select(st…
💬 Now an end-to-end simulation comparing the generated provider config to the old hardcoded one: 🔧 **bash**:cd /workspace/ffaerber/agents && bash -n .gitea/workflows/scripts/route.sh && echo "route.sh: OK" && bash -n .gitea/workflows/scripts/install-opencode.sh && echo "install-opencode.sh: OK"echo "--- AGENTS line length check (GITHUB_OUTPUT mu…
💬 Derived models exactly match the old hardcoded set. Empty-case yields{}. Now check for shell syntax issues withbash -n: 💬 Both scripts parse cleanly; theagents=output line is single-line (319 chars, no newlines) so it's a valid GITHUB_OUTPUT value. Let me also confirm there's no other consumer of the old hardcoded model list, then commit and push. 🔧 **grep**:gemma4|kimi-k2|minimax-m3|glm-5.2🔧 **bash**:cd /workspace/ffaerber/agents && git add .gitea/workflows/scripts/route.sh .gitea/workflows/scripts/install-opencode.sh .gitea/workflows/agent.yml && git status --short && echo "---DIFF STAT---" && git diff --cached --stat💬 Only the registry in route.sh now names the cloud model IDs — exactly the single source of truth we wanted. Committing and pushing. 🔧 **bash**:cd /workspace/ffaerber/agents && git commit -m "@senior: issue #29 — derive Ollama Cloud provider models from the agent registryThe agent→model registry in route.sh is now the single source of truth for
Ollama Cloud model IDs. route.sh pu…
💬 Pushed toai/issue-29. The change makes route.sh's agent registry the single source of truth for Ollama Cloud model IDs: it now publishes the registry as a step output, and install-opencode.sh derives the providermodels:map from it (unprefixed IDs), so the two files can no longer drift. Verified the derived set exactly matches the previously-hardcoded models, and that the// {}` empty-case keeps the config valid for repos where no agent uses an ollama-cloud model.BEGIN_PR_DESCRIPTION
Summary
Make the agent→model registry in
route.shthe single source of truth for Ollama Cloud model IDs, so the provider config ininstall-opencode.shcan no longer drift from it silently.route.shnow publishes the full registry as a step output;install-opencode.shderives theollama-cloudprovider'smodels:map from it (stripping theollama-cloud/prefix). No agent's model changed, and the routing/trigger-gate logic is untouched.Changes
route.sh: emitagents=$(jq -c '.' /tmp/agents.json)toGITHUB_OUTPUT(single-line, valid step-output value).agent.yml: passsteps.prep.outputs.agentsasAGENTSenv to the install-opencode step (mirrors the existingSKILLSpattern).install-opencode.sh: deriveCMODELSfrom$AGENTSand use it as theollama-cloudprovider'smodels:map;// {}keeps the JSON valid when no agent uses an ollama-cloud model (e.g. an all-anthropic caller repo). Removed the now-redundant hardcoded model list.END_PR_DESCRIPTION
Pull request closed