Skip to content

Skip models AWF marks as not automatically selectable in alias wildcards - #79576

Merged
rabeckett merged 2 commits into
mainfrom
fix/auto-skip-non-agent-models
Nov 20, 2026
Merged

rabeckett merged 2 commits into
mainfrom
fix/auto-skip-non-agent-models

Conversation

@rabeckett

@rabeckett rabeckett commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #78800
Fixes #76961

In #76961, a Copilot workflow with model: auto resolved to gpt-6-luna-decisions, an evaluation model that only serves /v1/decisions, and every agent attempt failed before producing output. gh-aw resolves aliases in the engine harness against the model list in AWF's /reflect, and that list contains every model in the org's Copilot catalogue, including models that can't run an agent. github/gh-aw-firewall#11740 (released in AWF v0.29.16) made AWF publish its decision for each model as routing_models[].automatic_selection_eligible, with automatic_selection_reason when it is false. gh-aw already pins AWF v0.29.17, so this PR makes gh-aw read that field instead of recomputing it.

When the shared resolver in resolve_model_alias.cjs expands an alias entry that contains *, it now treats models marked ineligible as non-matches, so resolution moves on to the next match or the next entry. Explicit choices are untouched: an exact model id, and an alias entry without * such as the built-in evals, still resolve against the full catalogue. A /reflect response without the field, from an older AWF, resolves exactly as before. Every engine's main model and sub-agent models go through resolveConfiguredModel, so the rule covers Copilot, Claude, Codex, Pi and Agy without engine-specific changes. A caller that passes its own catalogue alongside /reflect gets the same filtering. Claude's own auto selection on the Copilot provider (resolveClaudeAutoModel in model_fallback.cjs) also picks by wildcard, so it uses the same filter. The resolver logs which matches it skipped, so the reason shows up in the agent log.

Using the Copilot catalogue from the failed run:

Configured model Before After
auto, large gpt-6-luna-decisions gpt-5.3-codex
gpt-5 gpt-5.6-luna-utility (picker-disabled) gpt-5.3-codex
gpt-6 gpt-6-luna-decisions fails before the engine starts with model_unavailable; the log names the skipped model
evals, copilot/gpt-6-luna-decisions gpt-6-luna-decisions unchanged

The rule is written into the model alias specification as a new §8.4.4 (version 1.7.0, conformance test T-MAF-050). The glossary, the engines reference and the model tables page (through its generator) now say that wildcards skip models AWF marks as not automatically selectable. The model tables page also said aliases resolve "at compile time", which this change contradicts, so it now says they resolve when the workflow runs. The spec's Abstract and §16 said the same and are corrected too.

Testing

  • New cases in resolve_model_alias.test.cjs use the catalogue from Copilot auto model resolves to gpt-6-luna-decisions, then fails with unsupported reasoning.effort "medium" #76961: auto, large and gpt-5, both unscoped and scoped to Copilot; a caller-supplied catalogue; gpt-6 failing; the skip log; explicit choices; and /reflect without routing_models or without the field. model_fallback.test.cjs covers Claude's auto. The seven behaviour cases fail without the change.
  • Focused suites (resolve_model_alias, model_fallback) and tsc --noEmit pass on Windows.
  • Full gate on 65165aff04 (the current head) and earlier on ad71f2f512: make agent-report-progress with BASE_REF=368005d5fc (the merge base) passed in a disposable LF Linux arm64 clone with Go 1.27.4 and Node 24, and left no formatting changes.
  • The harness suites that resolve models through the shared step (Agy, Claude, Codex, Copilot, Pi, sub-agents, routing analytics) pass on Linux at ad71f2f512. The exception is 16 Copilot SDK-mode cases in copilot_harness.test.cjs, which fail locally without the Copilot SDK installed. The same 16 fail with the base commit's source.
  • Not run in the routing sandbox; no paid runs were authorised.

Alias wildcards now ignore models that an endpoint's /reflect routing_models
mark automatic_selection_eligible: false, so auto, large and gpt-5 no longer
resolve to Decisions-only or picker-disabled models. Exact ids and alias
entries without * still resolve as written, and /reflect without the field
behaves as before. Claude's auto on the Copilot provider follows the same rule.

Fixes #78800
Fixes #76961

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Shared runtime model-selection changes combine provider scoping, exact-ID precedence, and sub-agent endpoint filtering across engines, requiring broader review of their interacting startup and availability behavior.

No open issues 🎉

What changed in this PR

Updates gh-aw’s runtime model selection to skip models AWF marks as ineligible for automatic selection, addressing the agent-startup failures described in #78800 and #76961.

Changes:

  • Filters alias wildcard matches and Claude’s Copilot-provider auto selection while preserving exact choices and compatibility with older AWF responses.
  • Adds regression coverage for filtering, fallback, skipped-match logging, and compatibility.
  • Documents the eligibility rule and corrects model-table guidance to describe runtime resolution.
File Description
scripts/​generate-model-tables.js Generates updated eligibility and runtime-resolution guidance.
docs/​src/​content/​docs/​specs/​model-alias-specification.md Defines eligibility rules and conformance test T-MAF-050.
docs/​src/​content/​docs/​reference/​model-tables.md Updates generated alias-selection documentation.
docs/​src/​content/​docs/​reference/​glossary.md Explains wildcard filtering and exact-entry exceptions.
docs/​src/​content/​docs/​reference/​engines.md Documents filtering across engine alias resolution.
actions/​setup/​js/​resolve_model_alias.test.cjs Covers filtering, logging, explicit choices, and older responses.
actions/​setup/​js/​resolve_model_alias.cjs Adds shared eligibility filtering and skipped-match logging.
actions/​setup/​js/​model_fallback.test.cjs Covers Claude automatic-selection filtering.
actions/​setup/​js/​model_fallback.cjs Applies the shared filter to Claude’s Copilot-provider auto.
.changeset/​patch-alias-wildcards-skip-non-selectable-models.md Records the patch behavior and compatibility guarantees.

Review effort: Balanced

@rabeckett
rabeckett marked this pull request as ready for review November 20, 2026 19:40
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by PR Specification Reviewer for #79576 · copilot · gpt56 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.7K · ◷

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

Potential security threats were detected in the agent output. Detected threat types: prompt injection.

Review the workflow run logs for details.

PR Code Quality Reviewer

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.7K · ◷

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated by Ponytail Reviewer for #79576 · codex · routed: gpt61 medium · ~5 AIC · ⌖ ~1 AIC · ⊞ 185 · ◷

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

Reviewed head ad71f2f512d095cee3ff7b157f4257c09fa5d60c against Model Alias Format Specification v1.7.0.

Key issue

  • Blocking specification contradiction: The new §8.3/§8.4.4 and §8.8 describe runtime alias resolution and runtime eligibility filtering, but the same v1.7.0 document still states in the Abstract and §16 that alias resolution selects models at compile time. These conflicting normative lifecycle statements can lead implementors to choose the wrong catalog and timing. Please update the remaining compile-time wording before publishing v1.7.0. An inline comment is attached to the changed algorithm line.

Coverage

This was a static specification review; no tests or conformance scripts were run. No specification edits were applied.

References:

Generated by PR Specification Reviewer for #79576 · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review-specs to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-949761ca-e898-436c-9103-4fdb121c54b7","parents":[],"payload":{"id":"ldg-d63ee039-4236-4440-961c-b2d1b0848874","operation":"append","value":{"finding_count":1,"head_sha":"ad71f2f512d095cee3ff7b157f4257c09fa5d60c","outcome":"regression"}},"sha":"sha256:02cd22c7d141e71437e338ae0bb9885213a2f8ae9363f99bb461f0d8f722f993","timestamp":"2026-11-20T19:48:36.767Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.

Details

Potential security threats were detected in the agent output. Detected threat types: prompt injection.

Review the workflow run logs for details.

Found one blocking correctness issue: the new eligibility filter is bypassed whenever a caller supplies a precomputed catalog. Pi sub-agent resolution supplies both catalog and reflectData, so wildcard aliases can still select models AWF marks as non-agent-capable. Please filter supplied catalogs from routing_models metadata and add coverage for that call shape.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-3230aa3e-552c-4699-a6ee-1a1c83e59581","parents":[],"payload":{"id":"ldg-ea157f77-6a5a-43fc-b925-7d02b0e79a9a","operation":"append","value":{"finding_count":1,"head_sha":"ad71f2f512d095cee3ff7b157f4257c09fa5d60c","outcome":"findings"}},"sha":"sha256:a77bfb78834b6df467c132890a5fa1cabc8a7cc57e2220d4c5109a0244d60e39","timestamp":"2026-11-20T19:49:52.556Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd. The core fix is sound. One latent gap remains in resolveConfiguredModel, flagged inline.

📋 Key Themes & Highlights

Key Themes

  • Explicit catalog bypasses the filter: when options.catalog is an array, wildcardCatalog is the unfiltered catalog. No current production caller reaches this path.
  • Regression coverage gap: the new tests cover the reflectData path only, not catalog plus reflectData.

Positive Highlights

  • ✅ filterAutomaticallySelectable matches keys case-insensitively, does not mutate its input, and returns the same object when nothing is removed.
  • ✅ Exact ids and the configured name still use the full catalog, so explicit selections are unaffected.
  • ✅ The Claude auto path filters before building the catalog, and the new test covers it.
  • ✅ The skip log message is specific and matches the test expectations.
  • ✅ model-tables.md matches the generator output.

Verification Limits

  • Vitest did not run: the npm registry fails TLS verification in this environment. I checked the resolver with standalone Node scripts, so please rely on CI for the suites.
  • I could not fetch the AWF awf-config-spec.md (§12.8 link), and I could not confirm the v0.29.16 release claim. Both remain unverified.

@copilot please address the inline comment above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~7 AIC · ⌖ ~2 AIC · ⊞ 6.7K
Comment /matt to run again

… alias spec

Wildcards now skip models /reflect marks ineligible even when the caller passes
its own catalogue alongside /reflect, instead of bypassing the filter. The
alias spec's Abstract and section 16 now say resolution runs at run time,
matching section 8.8.

Co-authored-by: Copilot <[email protected]>
@rabeckett
rabeckett dismissed stale reviews from github-actions[bot] and github-actions[bot] November 20, 2026 20:00

Fixed in 65165af: the Abstract and section 16 now say alias resolution runs at run time (section 8.8). The review thread is answered and resolved.

@rabeckett
rabeckett merged commit 6238b13 into main Nov 20, 2026
104 of 105 checks passed
@rabeckett
rabeckett deleted the fix/auto-skip-non-agent-models branch November 20, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants