@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:
@@ -43,6 +43,9 @@ mode=$(jq -r --arg a "$name" '.[$a].mode' /tmp/agents.json)
|
||||
skills=$(jq -c --arg a "$name" '.[$a].skills // []' /tmp/agents.json)
|
||||
echo "Routing to @$name (model=$model vision=$vision mode=$mode skills=$skills)"
|
||||
{ echo "name=$name"; echo "model=$model"; echo "vision=$vision"; echo "mode=$mode"; echo "skills=$skills"; } >> "$GITHUB_OUTPUT"
|
||||
# Publish the full agent registry so install-opencode.sh can derive the provider `models:` map
|
||||
# from it — single source of truth for Ollama Cloud model IDs, so the two files can't drift.
|
||||
echo "agents=$(jq -c '.' /tmp/agents.json)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Act as the agent's own Gitea user when its token is set; else the built-in bot.
|
||||
case "$name" in
|
||||
|
||||
Reference in New Issue
Block a user