feat(agents): automatic model fallback when Ollama Cloud is exhausted
ci / lint (pull_request) Successful in 13s
ci / lint (pull_request) Successful in 13s
Keep ollama-cloud/* as primary. Each agent may declare fallback in agents.json (xai-oc/grok-*). On quota/auth/provider failure, run-agent switches once to the fallback and continues retries. - agents.json: fallback fields for pm/junior/senior/qa/intern - route.sh: emit fallback to GITHUB_OUTPUT - agent.yml: pass FALLBACK env into run-agent - install-opencode.sh: register primary+fallback models in provider maps - run-agent.sh: failover on quota/credit/429/capacity-class errors
This commit is contained in:
@@ -1,28 +1,31 @@
|
||||
{
|
||||
"pm": {
|
||||
"model": "xai-oc/grok-4.5",
|
||||
"model": "ollama-cloud/minimax-m3:cloud",
|
||||
"fallback": "xai-oc/grok-4.5",
|
||||
"vision": true,
|
||||
"mode": "comment",
|
||||
"skills": [
|
||||
"gitea-api"
|
||||
],
|
||||
"desc": "Product manager & orchestrator — plans and picks the dev, hands each finished PR to @qa for review, and reports back to the issue creator (in autopilot it merges approved PRs itself). Works from the issue thread only — comments only, never edits files, never reads the PR diff. Model: grok-4.5 via xAI (Ollama Cloud quota exhausted)."
|
||||
"desc": "Product manager & orchestrator — plans and picks the dev, hands each finished PR to @qa for review, and reports back to the issue creator (in autopilot it merges approved PRs itself). Works from the issue thread only — comments only, never edits files, never reads the PR diff. Falls back to xAI grok-4.5 if Ollama Cloud is unavailable/quota-exhausted."
|
||||
},
|
||||
"junior": {
|
||||
"model": "xai-oc/grok-4.3",
|
||||
"model": "ollama-cloud/kimi-k2.7-code:cloud",
|
||||
"fallback": "xai-oc/grok-4.3",
|
||||
"vision": false,
|
||||
"mode": "pr",
|
||||
"skills": [],
|
||||
"desc": "Junior dev — small, low-risk changes (mostly YAML/compose/config). Text-only, cannot read images. Defers complex or image tasks to @senior or @lead. Model: grok-4.3 via xAI."
|
||||
"desc": "Junior dev — small, low-risk changes (mostly YAML/compose/config). Text-only, cannot read images. Defers complex or image tasks to @senior or @lead. Falls back to xAI grok-4.3 if Ollama Cloud fails."
|
||||
},
|
||||
"senior": {
|
||||
"model": "xai-oc/grok-4.5",
|
||||
"model": "ollama-cloud/glm-5.2:cloud",
|
||||
"fallback": "xai-oc/grok-4.5",
|
||||
"vision": false,
|
||||
"mode": "pr",
|
||||
"skills": [
|
||||
"gitea-api"
|
||||
],
|
||||
"desc": "Senior dev — complex, multi-file implementation (text-only). Model: grok-4.5 via xAI (moved off Ollama Cloud)."
|
||||
"desc": "Senior dev — complex, multi-file implementation (GLM-5.2 via Ollama Cloud, text-only). Falls back to xAI grok-4.5 if Ollama Cloud fails."
|
||||
},
|
||||
"lead": {
|
||||
"model": "xai-oc/grok-4.5",
|
||||
@@ -34,13 +37,14 @@
|
||||
"desc": "Tech lead — the hardest problems, architecture, and final calls."
|
||||
},
|
||||
"qa": {
|
||||
"model": "xai-oc/grok-4.5",
|
||||
"model": "ollama-cloud/minimax-m3:cloud",
|
||||
"fallback": "xai-oc/grok-4.5",
|
||||
"vision": true,
|
||||
"mode": "comment",
|
||||
"skills": [
|
||||
"gitea-api"
|
||||
],
|
||||
"desc": "QA / reviewer — reviews PRs: reads the diff, drives a headless browser (Playwright) to verify behavior, posts specific recommendations on the PR and the pass/fail verdict on the issue. Never edits code, never merges. Model: grok-4.5 via xAI."
|
||||
"desc": "QA / reviewer — reviews PRs: reads the diff, drives a headless browser (Playwright) to verify behavior, posts specific recommendations on the PR and the pass/fail verdict on the issue. Never edits code, never merges. Falls back to xAI grok-4.5 if Ollama Cloud fails."
|
||||
},
|
||||
"ops": {
|
||||
"model": "xai-oc/grok-4.5",
|
||||
@@ -53,9 +57,10 @@
|
||||
},
|
||||
"intern": {
|
||||
"model": "ollama/ornith:35b",
|
||||
"fallback": "xai-oc/grok-4.3",
|
||||
"vision": false,
|
||||
"mode": "pr",
|
||||
"skills": [],
|
||||
"desc": "Intern — very basic tasks only, routed to the local Ollama model (ornith:35b). Text-only, cannot read images. Escalates anything non-trivial to @junior, @senior or @lead."
|
||||
"desc": "Intern — very basic tasks only, routed to the local Ollama model (ornith:35b). Text-only, cannot read images. Escalates anything non-trivial to @junior, @senior or @lead. Falls back to xAI grok-4.3 if local Ollama is down."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user