Allow mai-code-1-flash in Copilot model validation#5831
Conversation
mai-code-1-flash in Copilot model validation
There was a problem hiding this comment.
Pull request overview
Aligns AWF’s host-side Copilot model allowlist validation with the repository’s existing Copilot model catalog so that COPILOT_MODEL=mai-code-1-flash is accepted during preflight validation (instead of being rejected before container startup).
Changes:
- Added
mai-code-1-flashto theSUPPORTED_COPILOT_MODELSallowlist used byvalidateCopilotModel(). - Extended
validateCopilotModelunit tests to assertmai-code-1-flashis accepted as a supported canonical model value.
Show a summary per file
| File | Description |
|---|---|
src/copilot-model.ts |
Adds mai-code-1-flash to the supported-model allowlist used by host-side validation and canonicalization. |
src/copilot-model.test.ts |
Adds a test-case ensuring mai-code-1-flash is accepted by validateCopilotModel(). |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Low
|
✅ Copilot review passed with no inline comments. @copilot Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
🚀 Security Guard has started processing this pull request |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
✅ Contribution Check completed successfully! PR #5831 follows the applicable contribution guidelines based on the provided metadata, diff, and CONTRIBUTING.md: focused TypeScript change, adjacent test coverage included, no documentation update needed, clear PR description, and files are in src/. |
|
✅ Build Test Suite completed successfully! |
|
✅ Smoke Gemini completed. All facets verified. 💎 |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
Chroot tests failed Smoke Chroot failed - See logs for details. |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Claude passed |
Smoke Test: Copilot PAT Auth — PASS ✅
Auth mode: PAT (COPILOT_GITHUB_TOKEN) | Author: Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
✅ Smoke Test: Copilot BYOK (Direct) Mode
Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY) → api-proxy → api.githubcopilot.com Result: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Claude Engine Validation
Overall Result: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Services Connectivity
Overall: FAIL — Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: Gemini Engine Validation
Overall status: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
🔬 Smoke Test Results
Overall: PASS (core connectivity verified) cc Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Smoke test results:\n- PR: chore: upgrade gh-aw to v0.82.2 pre-release and recompile workflows ✅\n- PR: fix: chmod squid logs inside container before compose down ✅\n- PR: Add host/sidecar parity guard for API proxy provider env constants ✅\n- PR: Deduplicate provider auth header construction across runtime, validation, and model fetch paths ✅\n- GitHub query: ✅\n- Browser title check: ❌\n- File write: ✅\n- Discussion query/comment: ✅\n- Build: ✅\n- Overall: FAIL Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🔬 OTEL Tracing Smoke Test Results — Run #28636542008
Scenarios 1–4 all passed. Scenario 5 ( Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
$(sed s///g /tmp/gh-aw/agent/comment-body.md) Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Implements the three-part fix from issue #6024: 1. Single source of truth comment — SUPPORTED_COPILOT_MODELS in src/copilot-model.ts now documents exactly which related files must be updated when adding or retiring a model. 2. CI guard — new src/copilot-model-catalog-sync.test.ts fails if any model added to ai-credits-pricing.js is missing from SUPPORTED_COPILOT_MODELS and not explicitly excluded. This catches the class of bug fixed in #5831 (mai-code-1-flash) before it ships. 3. Pointer comment in ai-credits-pricing.js — directs contributors to add new Copilot CLI models to SUPPORTED_COPILOT_MODELS as well. testHelpers export added to copilot-model.ts (@internal / ts-prune-ignore-next) to give the sync test access to the internal Set.
…atalog (#6039) * Initial plan * feat: add CI guard to prevent model allowlist drift Implements the three-part fix from issue #6024: 1. Single source of truth comment — SUPPORTED_COPILOT_MODELS in src/copilot-model.ts now documents exactly which related files must be updated when adding or retiring a model. 2. CI guard — new src/copilot-model-catalog-sync.test.ts fails if any model added to ai-credits-pricing.js is missing from SUPPORTED_COPILOT_MODELS and not explicitly excluded. This catches the class of bug fixed in #5831 (mai-code-1-flash) before it ships. 3. Pointer comment in ai-credits-pricing.js — directs contributors to add new Copilot CLI models to SUPPORTED_COPILOT_MODELS as well. testHelpers export added to copilot-model.ts (@internal / ts-prune-ignore-next) to give the sync test access to the internal Set. * fix: address review feedback on copilot-model test helpers - Export testHelpers.supportedCopilotModels as a ReadonlySet defensive copy to prevent accidental mutation of the production singleton in tests - Update normalizeSeparators() comment to accurately describe full canonicalization (lowercase + separator replacement), not just separator normalization --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
AWF rejected
COPILOT_MODEL=mai-code-1-flashat host-side validation even though the model is already recognized elsewhere in the repo for pricing/routing. This change closes that allowlist drift so valid Copilot configs are not blocked before container startup.What changed
mai-code-1-flashtoSUPPORTED_COPILOT_MODELSinsrc/copilot-model.ts.src/copilot-model.test.tsto assert the model is accepted as a canonical supported value.Why this matters
retired or unsupported) for a model AWF already knows how to handle downstream.Example