fix(api-proxy): honor configured providers in model steering - #6963
Conversation
There was a problem hiding this comment.
Pull request overview
Prevents API-proxy model aliases from steering requests toward unconfigured providers and makes configuration failures fail fast.
Changes:
- Filters alias candidates using configured provider slots.
- Returns non-retryable HTTP 403 errors for missing providers while retaining retryable OIDC responses.
- Documents token-steering opt-out and adds focused tests.
Show a summary per file
| File | Description |
|---|---|
src/awf-config-schema.json |
Clarifies token-steering configuration. |
docs/awf-config.schema.json |
Updates published schema documentation. |
docs/awf-config-spec.md |
Documents filtering, opt-out, and error semantics. |
docs/api-proxy-sidecar.md |
Documents explicit steering opt-out. |
containers/api-proxy/server.routing.test.js |
Tests provider error responses. |
containers/api-proxy/server.lifecycle.test.js |
Updates adapter lifecycle expectations. |
containers/api-proxy/server.js |
Applies provider filtering to routing and advertisement. |
containers/api-proxy/proxy-utils.js |
Adds retryability-aware error construction. |
containers/api-proxy/providers/copilot.js |
Marks pending OIDC tokens retryable. |
containers/api-proxy/model-resolver.test.js |
Tests configured-provider filtering. |
containers/api-proxy/model-resolver.js |
Implements provider model filtering. |
containers/api-proxy/model-config.js |
Integrates filtering into model rewriting. |
containers/api-proxy/copilot-adapter-enterprise.test.js |
Verifies transient OIDC behavior. |
containers/api-proxy/adapter-factory.test.js |
Updates default error expectations. |
containers/api-proxy/adapter-factory.js |
Propagates retryability metadata. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 15/15 changed files
- Comments generated: 3
- Review effort level: Balanced
|
@copilot address review feedback |
…-fix-token-steering
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ 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 Claude passed |
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed... |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Security Guard completed successfully! Security review complete for PR #6963. No security vulnerabilities found. Changes improve provider configuration validation and fix retry behavior for unconfigured providers (403 + retryable:false prevents loops). All firewall rules, capabilities, domain allowlists, and input validation remain unchanged. OIDC logic correction improves correctness without security regression. |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
❌ Contribution Check failed. Please review the logs for details. |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed... |
|
✅ Build Test Suite completed successfully! |
|
✅ Smoke Gemini completed. All facets verified. 💎 |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ |
Smoke Test: Claude Engine Validation
Overall result: PASS ✅
|
Smoke Test: Services Connectivity
Overall: FAIL —
|
Smoke Test: Copilot BYOK (Direct) Mode
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com Overall: PASS
|
|
Smoke Test: Copilot Engine —
Overall: PASS
|
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain (github.com) reachable: allowed=200 Overall status: PASS cc Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
📡 OTel Tracing Smoke Test Results
Summary: All checkable scenarios passed. No regressions detected.
|
Chroot Version Comparison
Overall result: ❌ Not all tests passed — Node.js version differs between host and chroot environment (v24.18.0 vs v22.23.1).
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS All 18 projects across Bun, C++, Deno, .NET, Go, Java, Node.js, and Rust built/installed and tested successfully. No errors encountered. All repositories cloned successfully. Note: Java builds required setting
|
|
Merged PRs:
Tests:
Overall: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
|
Docker Sbx Smoke Test — PR #6963 (author/assignees: cc as applicable)
Overall: PASS
|
Gemini Smoke Test Results
Overall status: FAIL
|
provider_not_configurednon-retryable (HTTP 403,retryable: false); keep 503/retryable only for transient OIDC statesapiProxy.enableTokenSteeringopt-out and the new alias-filtering behaviorfilterAvailableModelsToConfiguredProviders, steering repro, retryable OIDC case)npm run build+npm run lintclean