Repository navigation
Recover Copilot endpoint incompatibilities without losing subagent tools - #9559
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Pre-translated requests cannot recover when stale metadata selects the wrong endpoint.
1 open finding
What changed in this PR
Adds Copilot wire-API recovery while preserving request features and explicit fallback behavior.
Changes:
- Retries endpoint incompatibilities using the alternate API.
- Rejects lossy custom-tool translations with actionable errors.
- Adds regression coverage and documentation.
| File | Description |
|---|---|
docs/api-proxy-sidecar.md |
Documents recovery and custom-tool limits. |
containers/api-proxy/wire-api-compat.js |
Extends safe translation handling. |
containers/api-proxy/wire-api-compat.test.js |
Tests custom-tool compatibility. |
containers/api-proxy/upstream-retry.js |
Prioritizes endpoint recovery. |
containers/api-proxy/upstream-retry.test.js |
Tests retry ordering and errors. |
containers/api-proxy/upstream-response.js |
Connects recovery to response handling. |
containers/api-proxy/upstream-http.js |
Dispatches alternate-endpoint retries. |
containers/api-proxy/server.model-not-supported.test.js |
Tests end-to-end recovery behavior. |
containers/api-proxy/server.model-fallback-chain.test.js |
Updates fallback-chain expectations. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (provider !== 'copilot' || !wireApiSourceBody || | ||
| (wireApiCompatibility && !wireApiCompatibility.passthrough)) return false; |
|
@copilot address review feedback |
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Fixed in |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit f6e8832 |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 93.00% | 93.00% | ➡️ +0.00% |
| Statements | 91.49% | 91.49% | ➡️ +0.00% |
| Functions | 90.20% | 90.20% | ➡️ +0.00% |
| Branches | 85.26% | 85.25% | 📉 -0.01% |
📁 Per-file Coverage Changes (2 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/one-shot-adapter.ts |
83.5% → 82.9% (-0.60%) | 80.3% → 79.8% (-0.56%) |
src/log-directory-setup.ts |
96.8% → 100.0% (+3.18%) | 96.9% → 100.0% (+3.13%) |
Coverage comparison generated by scripts/ci/compare-coverage.ts
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
🔑 Smoke Copilot BYOK is testing direct BYOK mode on this pull request... |
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Build Test Suite completed successfully!
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
✅ Smoke Claude passed
|
|
🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request... |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
✅ Build Test Suite completed successfully!
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Claude passed
|
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
Smoke Test: Cloud Hypervisor + Copilot
All checks passed.
|
|
Services smoke test: PASS
|
|
Smoke Copilot: PASS ✅
PR: "Recover Copilot endpoint incompatibilities without losing subagent tools"
|
Smoke Claude Results
Overall result: PASS
|
Chroot Version Comparison
Result: Not all tests passed (Node.js version mismatch), so the
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS — cc
|
Smoke Test: Copilot BYOK (Direct Mode) ✅
Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY) via api-proxy sidecar Overall Status: ✅ PASS
|
|
Smoke OTEL tracing
|
🏗️ Build Test Suite Results
Overall: 5/8 ecosystems passed — FAIL Failures: Bun and Deno could not run because the
|

Copilot subagent requests could fail after successful egress because the selected model rejected the wire API or translation could not preserve custom tools.
Endpoint recovery
Feature preservation
Coverage and documentation