You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: fallback model for engine.model when the primary model is unavailable #64528
engine.model accepts a single model. If that model returns 5xx, times out or is temporarily unavailable, the agent job fails and the workflow produces no output. Retrying (engine.harness.max-retries) only re-runs the same model, and the harness stops on "model not supported". There is no gh-aw-level way to say "try model B if model A fails".
In practice, individual models on a shared endpoint have outages on their own. In one case, one model returned 503 Service Unavailable while another model on the same endpoint answered normally seconds later. The failed run posted no result, and the workaround was to build a second workflow call outside gh-aw.
Proposal
Accept an ordered list, or a dedicated field, in frontmatter:
engine:
id: copilot
model: grok-4.7
fallback-models: # tried in order after the primary fails
- gpt-5.6-luna
- mai-code-1.1-flash
harness:
max-retries: 3 # per model
Suggested semantics
Trigger fallback only for failures that are model- or endpoint-specific and persist after harness retries. Examples are 5xx, timeouts, model_not_supported and persistent 400 tied to the model. Auth errors, MCP policy errors and quota (429) should not trigger it, because another model won't help.
Each model gets its own max-retries budget with the existing backoff.
The switch happens inside the same agent job, so the artifacts, safe outputs and activation job are unchanged.
The model actually used is recorded (e.g. in GH_AW_INFO_MODEL, aw_info and telemetry) so reports and cost accounting stay accurate. A workflow that shows "Model: X" in its output must show the fallback model when it was used.
If all models fail, behaviour is as today: the job fails and the failure is reported.
Existing single-model workflows behave exactly as now.
Alternatives considered
Retry the same model: does not help when one model is down.
Caller-side second workflow call with a different model input: works, but needs a model input on every reusable workflow, produces a red check even when the second call succeeds, and duplicates the wiring in every consumer repo.
A separate job after agent: duplicates the whole agent setup and breaks the single-agent-job assumption in safe outputs.
Activity
lpcox commentedon Oct 2, 2026
🔗 AWF tracking issue: github/gh-aw-firewall#9353