[awf] Support Azure Copilot BYOK env routing in api-proxy and resolve gpt-5.4 via gpt-5 family aliases#3241
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Azure Copilot BYOK environment routing to the api-proxy's OpenAI adapter and introduces a gpt-5.<minor> → gpt-5 family-alias fallback so versioned model IDs resolve against existing gpt-5 alias policies.
Changes:
- Forward
COPILOT_PROVIDER_TYPE/BASE_URL/API_KEYfromadditionalEnv/envFile/envAllinto the api-proxy container, and consume them in the OpenAI adapter (withOPENAI_*precedence preserved). - Add
gpt-5.<minor>→gpt-5alias fallback inmodel-resolver.js. - Add coverage for adapter env precedence, compose env propagation, and the resolver fallback.
Show a summary per file
| File | Description |
|---|---|
| src/services/api-proxy-service.ts | Reads Copilot BYOK env values from config sources and injects them into api-proxy container env. |
| src/services/api-proxy-service.test.ts | Tests BYOK env propagation from additionalEnv and envFile. |
| containers/api-proxy/providers/openai.js | Accepts Azure Copilot BYOK envs as OpenAI adapter config, parses host/basePath from BYOK base URL, updates not-configured error message. |
| containers/api-proxy/oidc-token-provider.test.js | Covers BYOK-derived OpenAI config and OPENAI_* precedence over BYOK. |
| containers/api-proxy/model-resolver.js | Adds gpt-5.<minor> family fallback to the alias lookup. |
| containers/api-proxy/model-resolver.test.js | Tests gpt-5.4 resolves via the gpt-5 alias family. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 6/6 changed files
- Comments generated: 0
|
❌ Smoke test results:
FAIL (2/3 tests passed)
|
Smoke Test: Copilot BYOK (Offline) Mode
Note: Running in BYOK offline mode ( Overall: FAIL — template variables (
|
This comment has been minimized.
This comment has been minimized.
Smoke Test Results
Overall: FAIL — MCP credentials unavailable; pre-computed step outputs were not injected into the prompt. cc
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL
|
Chroot Version Comparison Results
Overall: ❌ Not all versions match — Python and Node.js differ between host and chroot environments.
|
Smoke Test Results
PR titles found in git log:
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.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
|
Last merged PRs:
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.
|
Azure-hosted BYOK runs were failing before request execution because api-proxy ignored Copilot BYOK Azure env vars, then model resolution missed
gpt-5.4when onlygpt-5family aliases were configured. This PR wires Azure BYOK envs into the OpenAI adapter path and addsgpt-5.x → gpt-5alias-family fallback behavior.Azure Copilot BYOK env compatibility (api-proxy service + OpenAI adapter)
COPILOT_PROVIDER_TYPE,COPILOT_PROVIDER_BASE_URL, andCOPILOT_PROVIDER_API_KEYinto the api-proxy container from AWF config/env sources.providers/openai.js, treatCOPILOT_PROVIDER_TYPE=azure+ BYOK vars as OpenAI adapter configuration when explicitOPENAI_*is not set.COPILOT_PROVIDER_BASE_URLso Azure deployment base paths are preserved.OPENAI_*config still overrides Copilot BYOK-derived values.Model resolution for
gpt-5.4gpt-5.<minor>togpt-5alias key when a direct alias entry is absent.gpt-5family alias policies (e.g.copilot/gpt-5*) to resolve versioned requests likegpt-5.4without requiring duplicate alias entries.Targeted coverage updates
additionalEnvandenvFile.gpt-5.4family fallback resolution.