fix: Allow all models when COPILOT_PROVIDER_BASE_URL is set#4660
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
GitHub API: ✅ PASS Total: PASS
|
There was a problem hiding this comment.
Pull request overview
This PR updates CLI config validation to avoid rejecting retired/unsupported COPILOT_MODEL values when the user is routing Copilot through a non-default provider endpoint (via COPILOT_PROVIDER_BASE_URL / model router), restoring compatibility for BYOK/non-CAPI setups.
Changes:
- Skips
validateCopilotModel()when a custom Copilot provider base URL is detected, allowing custom/retired model names in that mode. - Adds a unit test asserting that BYOK + provider base URL allows a custom
COPILOT_MODELvalue.
Show a summary per file
| File | Description |
|---|---|
| src/commands/validators/config-assembly.ts | Adds detection of custom provider base URL and conditionally bypasses Copilot model retirement validation. |
| src/commands/validators/config-assembly.test.ts | Adds coverage for allowing custom COPILOT_MODEL when BYOK mode is used with a provider base URL. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
Smoke Test Results — PAT Auth
Overall: PASS · Auth mode: PAT (COPILOT_GITHUB_TOKEN)
|
Smoke Test Results: fix: Allow all models when COPILOT_PROVIDER_BASE_URL is set
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 Overall status: FAIL cc Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "api.openai.com"See Network Configuration for more information.
|
🔬 Smoke Test Results
PR: fix: Allow all models when COPILOT_PROVIDER_BASE_URL is set Overall: PASS 🟢
|
|
Overall: PASS
|
Chroot Version Comparison Results
Overall: ❌ Not all tests passed — Python and Node.js versions differ between host and chroot environments.
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results: Copilot BYOK (Direct) Mode✅ GitHub MCP connectivity Status: PASS — Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy sidecar
|
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
d3fe002
into
copilot/debugging-action-run
…step outputs resolve (#4540) * fix(smoke-otel-tracing): use api-proxy-logs host log path * fix(smoke-aoai-apikey): pass pre-step data via files not step outputs * refactor(smoke-aoai-apikey): move smoke-data to activation pre-steps * fix: Allow all models when COPILOT_PROVIDER_BASE_URL is set (#4660) * fix: allow BYOK provider model validation * fix: check env-file for provider base URL in model bypass --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Fixes Copilot CLI + non-Copilot Provider BYOK break introduced in #4588 - when specifying
COPILOT_PROVIDER_BASE_URLyou SHOULD be able to choose a model even if deprecated.Note: Alternative implementation could check specifically if
COPILOT_PROVIDER_BASE_URLis set to CAPI, but this is arguably unnecessary as COPILOT_PROVIDER_BASE_URL and detecting CAPI url formats is potentially error-prone.