Make Copilot Task-tool "No model available" failures non-fatal#51181
Conversation
… harness Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot investigate why this is failing |
Investigated — this isn't a test or build failure. Every workflow run on this branch has conclusion The only run that executed is I re-ran every job the
Two things worth noting from the investigation:
One false alarm on my side that's worth recording: the four Approving the pending workflow runs should turn the PR green. |
|
Hey Strengths:
Next steps:
|
Copilot-engine workflows that spawn subagents via the
Tasktool fail 100% of the time: the SDK throwsNo model available. Check policy enablement under GitHub Settings > Copilotbefore any inference request is dispatched. The harness classified this as genericpartial_execution, so it burned all 4 attempts reproducing the identical error and failed the job.This implements remediation option 3 from the issue — a stopgap that keeps runs green while the policy/entitlement question is resolved separately.
Changes in
actions/setup/js/copilot_harness.cjsNO_MODEL_AVAILABLE_PATTERN/isNoModelAvailableError()match the SDK's policy-gate message.no_model_availablefailure class inclassifyCopilotFailure, ranked belowmodel_not_supportedso the more specific configured-model error still wins. Surfaced in the per-attempt diagnostic line asisNoModelAvailableError=….mcp_policy_blocked/model_not_supportedpersistent-error branches.missing_toolsignal fortaskso the unavailable capability is visible downstream instead of being lost in a red job.Tests
copilot_harness.test.cjscovers the detector (including negatives against the unrelatedThe requested model is not supportedmessage), classification precedence, and both branches of themissing_toolemitter.Not addressed here
Why subagent sessions resolve no model (options 1/2 in the issue — entitlement/allowlisting, or disabling
Taskfor Copilot-engine workflows) remains open. This change only ensures the failure mode is cheap and non-fatal.