Align Copilot reflection metadata with routing eligibility - #9381
Conversation
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
/reflect APIThere was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The real /reflect path still receives sanitized records without the routing metadata required by the new normalization.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Aligns Copilot reflection metadata and routing eligibility, including picker-disabled model filtering.
Changes:
- Preserves and applies Copilot model-picker eligibility.
- Shares routing-choice logic with
/reflect. - Adds exclusion metadata and tests.
| File | Description |
|---|---|
docs/api-proxy-sidecar.md |
Documents exclusion reasons. |
containers/api-proxy/runtime-model-catalog.js |
Retains picker eligibility. |
containers/api-proxy/runtime-model-catalog.test.js |
Tests metadata normalization. |
containers/api-proxy/routing-catalogue.js |
Propagates picker eligibility. |
containers/api-proxy/routing-candidates.js |
Filters disabled models and shares choice logic. |
containers/api-proxy/routing-candidates.test.js |
Tests picker filtering. |
containers/api-proxy/management.js |
Derives reflection completeness from routing choices. |
containers/api-proxy/management.test.js |
Tests reflection-routing consistency. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| : (runtime?.capabilities?.supports?.reasoningEffort === false | ||
| ? [] | ||
| : (maintained?.reasoningEfforts ?? null)); | ||
| const normalized = normalizeModel(id, runtime, provider); |
|
@copilot address review feedback |
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Fixed in |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 4dd0fdc |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (4 files)
Coverage comparison generated by |
|
✅ Security Guard completed successfully! Security review of PR #9381: No security issues found. The PR refactors model routing metadata handling in the API proxy sidecar, adding support for
|
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed...
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed...
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
Smoke Cloud Hypervisor reports failed. Cloud Hypervisor + Copilot failed.
|
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation... Smoke test incomplete: required binaries
|
|
✅ Smoke Claude passed
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
✅ Build Test Suite completed successfully!
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Smoke Copilot: PASS
|
|
EGRESS_RESULT allow=pass deny=pass
cc
|
|
OTEL smoke test
|
Smoke Test: Copilot BYOK (Direct) Mode✅ GitHub MCP — PR listing verified (2 recent merged PRs) Status: PASS — Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY)
|
|
Services smoke test:
Overall: PASS
|
Chroot Version Comparison
Result: Not all tests passed. Node.js differs between host (v24) and chroot (v22), so the
|
🏗️ Build Test Suite Results
Overall: 5/8 ecosystems passed — FAIL Failure details
All 8 repositories cloned successfully. The
|

Copilot
/reflectcould mark routable models incomplete, while routing candidates could include models disabled in the model picker. This made the reflection catalogue disagree with the choices available to the router./reflectcompleteness, including Copilot’sreasoning_effortfield and models with no effort control.model_picker_enabledin runtime metadata and exclude disabled Copilot models, even when explicitly allowlisted.candidate_metadata_reasonfor picker-disabled models.{ "model_id": "internal-model", "candidate_metadata_complete": false, "candidate_metadata_reason": "Model is not enabled in the Copilot model picker" }/reflectmarks every Copilot model incomplete, and the candidate pool includes non-picker models #9379