Repository navigation
Skip models AWF marks as not automatically selectable in alias wildcards - #79576
Conversation
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]>
There was a problem hiding this comment.
🔵 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
autoselection 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
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Code Quality ReviewerOutcome: 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
There was a problem hiding this comment.
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
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
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
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
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
catalogbypasses the filter: whenoptions.catalogis an array,wildcardCatalogis the unfilteredcatalog. No current production caller reaches this path. - Regression coverage gap: the new tests cover the
reflectDatapath only, notcatalogplusreflectData.
Positive Highlights
- ✅
filterAutomaticallySelectablematches 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
autopath filters before building the catalog, and the new test covers it. - ✅ The skip log message is specific and matches the test expectations.
- ✅
model-tables.mdmatches 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]>
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.
Fixes #78800
Fixes #76961
In #76961, a Copilot workflow with
model: autoresolved togpt-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 asrouting_models[].automatic_selection_eligible, withautomatic_selection_reasonwhen 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.cjsexpands 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-inevals, still resolve against the full catalogue. A/reflectresponse without the field, from an older AWF, resolves exactly as before. Every engine's main model and sub-agent models go throughresolveConfiguredModel, so the rule covers Copilot, Claude, Codex, Pi and Agy without engine-specific changes. A caller that passes its own catalogue alongside/reflectgets the same filtering. Claude's ownautoselection on the Copilot provider (resolveClaudeAutoModelinmodel_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:
auto,largegpt-6-luna-decisionsgpt-5.3-codexgpt-5gpt-5.6-luna-utility(picker-disabled)gpt-5.3-codexgpt-6gpt-6-luna-decisionsmodel_unavailable; the log names the skipped modelevals,copilot/gpt-6-luna-decisionsgpt-6-luna-decisionsThe 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
resolve_model_alias.test.cjsuse the catalogue from Copilot auto model resolves to gpt-6-luna-decisions, then fails with unsupported reasoning.effort "medium" #76961:auto,largeandgpt-5, both unscoped and scoped to Copilot; a caller-supplied catalogue;gpt-6failing; the skip log; explicit choices; and/reflectwithoutrouting_modelsor without the field.model_fallback.test.cjscovers Claude'sauto. The seven behaviour cases fail without the change.resolve_model_alias,model_fallback) andtsc --noEmitpass on Windows.65165aff04(the current head) and earlier onad71f2f512:make agent-report-progresswithBASE_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.ad71f2f512. The exception is 16 Copilot SDK-mode cases incopilot_harness.test.cjs, which fail locally without the Copilot SDK installed. The same 16 fail with the base commit's source.