feat: add auto as a proper builtin model alias for Copilot - #48655
Conversation
…large fallback Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
auto as a proper builtin model alias for Copilot
|
@copilot recompile |
|
✅ Test Quality Sentinel completed test quality analysis. |
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅ |
There was a problem hiding this comment.
Pull request overview
Adds the auto builtin model alias so AWF policy recognizes Copilot’s native automatic model selection.
Changes:
- Maps
autotocopilot/auto, thenlarge. - Adds documentation and Copilot environment tests.
- Refreshes WASM golden outputs.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/data/model_aliases.json |
Defines the auto alias. |
pkg/workflow/model_aliases_test.go |
Verifies alias registration and values. |
pkg/workflow/model_env_vars_test.go |
Tests Copilot passthrough behavior. |
docs/src/content/docs/specs/model-alias-specification.md |
Documents resolution semantics. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/with-imports.golden |
Updates compiled policy fixture. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/smoke-copilot.golden |
Updates compiled policy fixture. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/playwright-cli-mode.golden |
Updates compiled policy fixture. |
pkg/workflow/testdata/TestWasmGolden_CompileFixtures/basic-copilot.golden |
Updates compiled policy fixture. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/pi.golden |
Updates Pi golden output. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/gemini.golden |
Updates Gemini golden output. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/copilot.golden |
Updates Copilot golden output. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden |
Updates Codex golden output. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/claude.golden |
Updates Claude golden output. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 13/13 changed files
- Comments generated: 1
- Review effort level: Medium
| "mini": ["haiku", "gpt-5-mini", "gpt-5-nano", "gemini-flash-lite"], | ||
| "fable": ["copilot/*fable*", "anthropic/*fable*"], | ||
| "large": ["fable", "sonnet", "gpt-5-pro", "gpt-5", "gemini-pro"], | ||
| "auto": ["copilot/auto", "large"], |
🧪 Test Quality Sentinel Report✅ Test Quality Score: 90/100 — Excellent
📊 Metrics (2 tests)
Design QualityBoth tests enforce critical design invariants for the new
Edge Case Coverage
Verdict
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd and /codebase-design — commenting with one coverage gap to address.
📋 Key Themes & Highlights
Key Themes
- Missing test for non-Copilot fallback:
TestAutoModelPassedToCopilotAsIsonly exercises the Copilot engine. Thelargefallback path for providers likeclaudeis untested. - Incomplete recompile: The pre-existing Copilot comment (#3666512777) correctly flags that
smoke-copilot-auto.lock.ymlwas not recompiled aftermodel_aliases.jsonchanged; that should be addressed before merge.
Positive Highlights
- ✅ Clean data-driven approach: one JSON entry in
model_aliases.jsonpropagates consistently through spec, golden files, and tests - ✅ Spec update (§9.2 + T-MAF-021) stays in sync with implementation — good /domain-modeling hygiene
- ✅ The
COPILOT_MODEL: autoassertion + no-fallback-var + no---model-flag triple-check in the new test is thorough for the happy path
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · sonnet46 · 30.3 AIC · ⌖ 4.71 AIC · ⊞ 6.7K
Comment /matt to run again
|
|
||
| // "auto" should not appear as a --model CLI flag | ||
| if strings.Contains(stepsContent, "--model auto") { | ||
| t.Errorf("--model flag should not be used; model must be passed via COPILOT_MODEL:\n%s", stepsContent) |
There was a problem hiding this comment.
[/tdd] The test only exercises the Copilot engine path — the large fallback for non-Copilot providers is not covered.
The auto alias is ["copilot/auto", "large"], meaning non-Copilot engines should resolve auto through large. If this mapping breaks, no test catches it.
💡 Suggested addition
Add a parallel test with a non-Copilot engine (e.g. claude) with model: auto that asserts the resolved model list does NOT include copilot/auto and does include a concrete large-family model.
@copilot please address this.
|
@copilot Run pr-finisher skill |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done — recompiled all 263 workflow lock files successfully (0 errors). Committed in |
|
@copilot resolve the merge conflicts on this branch. |
…llback path Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…s-proper-model-id # Conflicts: # .github/workflows/smoke-copilot-aoai-entra.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Here's what was addressed in this pass:
The PR is ready for human review and merge (CI must be re-triggered after the merge commit). |
The merge conflicts were already resolved in a previous session — commit |
|
/smoke-copilot-auto |
|
🚀 skillet has started processing this pull request comment |
autowas missing from the builtin model alias map despite being referenced in the spec (§9.2) and test comments as a known meta-alias. Without it, the AWF proxy had no policy knowledge ofauto, risking rejection of Copilot API requests whenCOPILOT_MODEL=autois set.Changes
data/model_aliases.json— adds"auto": ["copilot/auto", "large"]copilot/auto: Copilot API's native auto-select; passed through as-islarge: fallback for non-Copilot providersmodel_alias_specification.md— updates §9.2 table and T-MAF-021 to reflectauto → copilot/auto, largemodel_aliases_test.go— adds"auto"toexpectedFamiliesand asserts the alias valuemodel_env_vars_test.go— addsTestAutoModelPassedToCopilotAsIs: verifiesCOPILOT_MODEL=autois set verbatim with no fallback env var"auto"entry in the compiled AWF configapiProxy.modelsThe result in compiled output:
with
COPILOT_MODEL: autopassed unchanged to the Copilot CLI.