Refactor api-proxy startup to adapter-only validation/model discovery paths#3444
Conversation
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Smoke Test Results✅ GitHub API: 2 PR entries found in recent-prs.json Result: PASS — All smoke tests passed.
|
🔬 Smoke Test Results
PR: "Refactor api-proxy startup to adapter-only validation/model discovery paths" Overall: FAIL — pre-computed test data was not injected (workflow template variables were not expanded before agent invocation).
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the api-proxy startup flows so API key validation and startup model discovery rely exclusively on provider adapter contracts (getValidationProbe() / getModelsFetchConfig()), removing legacy “override object” branches that duplicated provider-specific URL/auth/header logic.
Changes:
- Simplified
validateApiKeysandfetchStartupModelsto acceptProviderAdapter[]only (defaulting to[]). - Removed inline legacy override-based probe/fetch logic from
containers/api-proxy/server.js. - Updated server tests to pass explicit mock adapters (or
[]) instead of override objects.
Show a summary per file
| File | Description |
|---|---|
| containers/api-proxy/server.js | Removes legacy override branches and makes startup validation/model-fetch purely adapter-driven. |
| containers/api-proxy/server.billing.test.js | Updates key-validation tests to use mock validation adapters instead of override objects. |
| containers/api-proxy/server.network.test.js | Updates startup model-fetch tests to use mock model-fetch adapters; keeps a real Copilot adapter case. |
| containers/api-proxy/server.lifecycle.test.js | Updates lifecycle health tests to call fetchStartupModels([]) for “no providers” completion. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 0
🔥 Smoke Test: Copilot BYOK Offline Mode
Running in BYOK offline mode ( PR by Overall: PARTIAL — BYOK inference path confirmed working; pre-step data was not injected (template vars unresolved).
|
|
PRs: Refactor option parser facade to direct re-exports and unify flag validation type; tests: replace host-env barrel imports with canonical host-env split modules 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.
|
Gemini Engine 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.
|
Chroot Smoke Test Results
Overall: ❌ FAILED — Python and Node.js versions differ between host and chroot environment.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results
Overall: FAIL — Service containers not reachable via
|
validateApiKeys()andfetchStartupModels()had parallel “legacy override” branches that duplicated provider-specific URL/auth/header logic already encapsulated by adapters. This created drift risk across startup validation, startup model fetch, and provider adapters.What changed
containers/api-proxy/server.js#validateApiKeyscontainers/api-proxy/server.js#fetchStartupModelsvalidateApiKeys(adapters = [])fetchStartupModels(adapters = [])getValidationProbe()getModelsFetchConfig()Test updates
containers/api-proxy/server.billing.test.jsnow builds probe adapters forvalidateApiKeys.containers/api-proxy/server.network.test.jsnow builds model-fetch adapters forfetchStartupModels.containers/api-proxy/server.lifecycle.test.jsusesfetchStartupModels([])for no-provider completion checks.Why this reduces maintenance risk