Make the agent→model registry and the ollama-cloud provider model list share a single source of truth so they can no longer drift (issue #31). The registry now lives in .gitea/workflows/scripts/agents.json; route.sh reads it for routing and install-opencode.shderives its ollama-cloudmodels: map from it.
Changes
New agents.json — single source of truth (agent → model/vision/mode/skills/desc), content identical to the previous inline registry.
route.sh — replaced the inline heredoc with a copy of agents.json (resolved via $SCRIPTS, with a $(dirname "$0") fallback for local runs).
install-opencode.sh — replaced the hardcoded ollama-cloud models: map with a jq-derived one built from agents.json.
Validation (by reviewer)
Derived provider map is set-identical to the prior hardcoded map — no behavior change.
agents.json registry content byte-identical to the old inline heredoc.
bash -n passes on both scripts.
Note: authored by @senior on issue #31. The automation did not open this PR because that run failed at a later step — the agent deleted the runtime .agents-workflow checkout (which is $SCRIPTS), breaking build-activity-log.sh/publish.sh. Opened manually. See separate infra follow-up.
## Summary
Make the agent→model registry and the ollama-cloud provider model list share a single source of truth so they can no longer drift (issue #31). The registry now lives in `.gitea/workflows/scripts/agents.json`; `route.sh` reads it for routing and `install-opencode.sh` **derives** its `ollama-cloud` `models:` map from it.
## Changes
- New `agents.json` — single source of truth (agent → model/vision/mode/skills/desc), content identical to the previous inline registry.
- `route.sh` — replaced the inline heredoc with a copy of `agents.json` (resolved via `$SCRIPTS`, with a `$(dirname "$0")` fallback for local runs).
- `install-opencode.sh` — replaced the hardcoded ollama-cloud `models:` map with a jq-derived one built from `agents.json`.
## Validation (by reviewer)
- Derived provider map is **set-identical** to the prior hardcoded map — no behavior change.
- `agents.json` registry content **byte-identical** to the old inline heredoc.
- `bash -n` passes on both scripts.
_Note: authored by @senior on issue #31. The automation did not open this PR because that run failed at a later step — the agent deleted the runtime `.agents-workflow` checkout (which is `$SCRIPTS`), breaking `build-activity-log.sh`/`publish.sh`. Opened manually. See separate infra follow-up._
Extract the agent registry to a shared agents.json and have both
route.sh (agent → model) and install-opencode.sh (ollama-cloud provider
models map) derive from it, so the two lists can no longer drift.
route.sh now copies agents.json to /tmp/agents.json instead of an inline
heredoc. install-opencode.sh builds the ollama-cloud map by
collecting every registry model with the prefix and
stripping it — non-ollama-cloud models (e.g. @lead's anthropic/claude-opus,
the local ornith:35b) are excluded by construction.
Resolves#31.
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 and the ollama-cloud provider model list share a single source of truth so they can no longer drift (issue #31). The registry now lives in
.gitea/workflows/scripts/agents.json;route.shreads it for routing andinstall-opencode.shderives itsollama-cloudmodels:map from it.Changes
agents.json— single source of truth (agent → model/vision/mode/skills/desc), content identical to the previous inline registry.route.sh— replaced the inline heredoc with a copy ofagents.json(resolved via$SCRIPTS, with a$(dirname "$0")fallback for local runs).install-opencode.sh— replaced the hardcoded ollama-cloudmodels:map with a jq-derived one built fromagents.json.Validation (by reviewer)
agents.jsonregistry content byte-identical to the old inline heredoc.bash -npasses on both scripts.Note: authored by @senior on issue #31. The automation did not open this PR because that run failed at a later step — the agent deleted the runtime
.agents-workflowcheckout (which is$SCRIPTS), breakingbuild-activity-log.sh/publish.sh. Opened manually. See separate infra follow-up.