Repository navigation
Refactor filtered model alias snapshots - #8818
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused refactor removes duplication while preserving behavior and adding targeted coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Centralizes filtered model-alias snapshot construction to keep API-proxy metadata consumers consistent.
Changes:
- Adds shared alias-filtering and snapshot helpers.
- Reuses snapshots across reflection, in-memory JSON, and persisted JSON.
- Tests persisted and in-memory alias consistency.
| File | Description |
|---|---|
| containers/api-proxy/server.models.test.js | Adds snapshot consistency coverage. |
| containers/api-proxy/server.js | Centralizes filtered model snapshot assembly. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ Copilot review passed with no inline comments. @copilot Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
📰 DEVELOPING STORY: Smoke Docker Sbx reports failed. Our correspondents are investigating the incident...
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ 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.
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
✅ Security Guard completed successfully! Security review complete: PR #8818 refactors API proxy model alias filtering logic. No security-weakening changes detected. Code deduplication preserves existing access controls, credential handling, and filtering behavior. Changes are isolated to containers/api-proxy/server.js (function extraction only). Passes security review.
|
|
✅ Build Test Suite completed successfully!
|
|
✅ Smoke Claude passed 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
- "api.anthropic.com"See Network Configuration for more information.
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 Warning Firewall blocked 7 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "accounts.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "msfeed25.pkgs.visualstudio.com"
- "update.googleapis.com"
- "www.google.com"
- "www.gstatic.com"See Network Configuration for more information.
|
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...
|
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain (github.com) reachable: Overall: PASS
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.
|
Smoke Test: Claude Engine Validation
Overall result: PASS 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
- "api.anthropic.com"See Network Configuration for more information.
|
|
Smoke Test: Copilot Engine — Overall: PASS
cc
|
Smoke Test: Copilot BYOK (Direct) Mode ✅Test Results:
Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY via api-proxy sidecar)
|
Smoke Test: API Proxy OpenTelemetry Tracing
Overall: ✅ All 5 scenarios passed. No regressions detected in OTEL tracing integration for the api-proxy sidecar.
|
|
Smoke Test: Services Connectivity — PASS
Overall: PASS
|
Chroot Version Comparison Results
Overall: FAILED — Node.js version inside the chroot ( Since not all tests passed, the
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Notes:
|
|
test(nvx): gate Linux-specific cases ✅ Warning Firewall blocked 7 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "accounts.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "msfeed25.pkgs.visualstudio.com"
- "update.googleapis.com"
- "www.google.com"
- "www.gstatic.com"See Network Configuration for more information.
|
Model alias filtering and models.json assembly were repeated across API-proxy metadata paths, risking drift.
Shared snapshot helpers
getFilteredModelAliases().buildModelsSnapshot().Unified consumers
buildModelsJson(), andwriteModelsJson().models.jsonretains the same resolvable aliases as the in-memory model snapshot.