Support COPILOT_MODEL=auto in AWF validation and api-proxy resolution#6474
Conversation
COPILOT_MODEL=auto in AWF validation and api-proxy resolution
There was a problem hiding this comment.
Pull request overview
Adds first-class support for Copilot’s auto model selector across validation and proxy resolution.
Changes:
- Accepts
COPILOT_MODEL=auto. - Preserves
autothrough proxy resolution. - Adds targeted validation and pass-through tests.
Show a summary per file
| File | Description |
|---|---|
src/copilot-model.ts |
Adds auto to supported Copilot models. |
src/copilot-model.test.ts |
Tests normalized auto validation. |
src/commands/validators/config-assembly-model-detection.test.ts |
Tests configuration acceptance. |
containers/api-proxy/model-resolver.js |
Implements special pass-through resolution. |
containers/api-proxy/model-resolver.test.js |
Tests resolution and body preservation. |
containers/api-proxy/server.startup-model-validation.test.js |
Tests startup validation without provider-list inclusion. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 2
- Review effort level: Medium
| const key = requestedModel.toLowerCase(); | ||
| const fallbackConfig = normalizeFallbackConfig(modelFallbackConfig); | ||
|
|
||
| if (key === 'auto') { |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
@copilot address review feedback |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
🔌 Smoke Services — All services reachable! ✅ |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
✅ Smoke Claude passed |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Contribution Check completed successfully! |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
❌ Smoke Copilot BYOK reports failed. BYOK mode investigation needed... |
🔬 Smoke Test Results
Overall: FAIL — Pre-computed step data was not available (template variables unexpanded), and MCP access was filtered by secrecy policy.
|
|
One thing looks missing for CONTRIBUTING.md: Documentation. This PR changes user-facing model validation/handling ( The tests and PR description look good, but I’d add a small README/docs note so users know
|
Smoke Test Results — FAIL ❌
Overall: FAIL
|
🔍 Smoke Test: API Proxy OpenTelemetry Tracing
All 6 scenarios pass. OTEL tracing integration is fully functional.
|
|
Smoke test: Copilot Network Isolation — EGRESS_RESULT allow=pass deny=pass
Overall: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
Chroot Version Comparison ✅All runtimes match between host and chroot environments.
|
Smoke Test: Claude Engine Validation
Overall Result: PASS ✅
|
|
Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra
|
Smoke Test Results
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.
|
|
Overall: FAIL
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — ❌ FAIL ❌ Failure DetailsJava (gson, caffeine) — Both projects failed during Maven cannot reach Maven Central (
|
🔬 Smoke Test: Copilot PAT Auth — PR #6474
Overall: PASS ✅
|
|
Smoke test results:
|
🔬 Smoke Test Results — Docker Sbx
Overall: INDETERMINATE — pre-step outputs were not injected into the prompt (template variables unexpanded). MCP PR data filtered by secrecy policy. /cc
|
AWF rejected the Copilot
automodel before request handling, even though upstream now treatsautoas a valid first-class model selector. This change letsautopass host-side validation and remain intact through api-proxy resolution.Host-side model validation
autoto the accepted Copilot model catalog insrc/copilot-model.tsCOPILOT_MODEL=autoin config assembly without tripping unsupported-model errorsAPI proxy model resolution
autoas a special pass-through incontainers/api-proxy/model-resolver.jsautoinstead of rewriting it to a concrete model or applying fallback heuristicsStartup model checks
autoas valid even when it does not appear in fetched provider model listsTargeted coverage
COPILOT_MODEL=autoacceptancemodel: "auto"AWF_REQUESTED_MODEL=autoExample:
{ "env": { "COPILOT_MODEL": "auto" } }With this change, AWF accepts that configuration and forwards
autounchanged to the Copilot path.