refactor: remove dead re-exports from providers/index.js#2800
Conversation
Remove 5 individual adapter factory re-exports (createOpenAIAdapter, createAnthropicAdapter, createCopilotAdapter, createGeminiAdapter, createOpenCodeAdapter) from providers/index.js. Only createAllAdapters is imported from this module (by server.js). All test files import individual adapters directly from their provider modules (e.g., ./providers/copilot, ./providers/openai). Closes #2775 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
This PR narrows the containers/api-proxy/providers module’s public surface by removing unused adapter-factory re-exports from providers/index.js, leaving createAllAdapters as the sole exported API used by server.js.
Changes:
- Removed dead
module.exportsre-exports for five individual adapter factories fromcontainers/api-proxy/providers/index.js. - Added an in-file comment clarifying that individual adapters should be imported from their specific provider modules, and that
createAllAdaptersis the intended public API.
Show a summary per file
| File | Description |
|---|---|
| containers/api-proxy/providers/index.js | Removes unused re-exports and documents createAllAdapters as the only supported export from the providers index module. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
🤖 Copilot Smoke Test Results
PR: refactor: remove dead re-exports from providers/index.js — by @lpcox, reviewer: Overall: PARTIAL — MCP confirmed working; pre-step smoke data unavailable (template vars not expanded in this run context).
|
Smoke Test Results✅ GitHub MCP Testing: Last 2 merged PRs
✅ Playwright Testing: github.com page title verified Status: PASS
|
Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode (
Overall: PARTIAL — BYOK inference confirmed ✅; pre-computed step outputs (
|
Codex Smoke Test
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.
|
Chroot Smoke Test Results
Overall: ❌ Not all versions matched. Go matches, but Python and Node.js differ between host and chroot environments.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Smoke Test Results
Overall: FAIL
|
Summary
Removes 5 individual adapter factory re-exports from
providers/index.jsthat are never imported from that path.Problem
providers/index.jsre-exported all 5 individual adapter factories (createOpenAIAdapter,createAnthropicAdapter,createCopilotAdapter,createGeminiAdapter,createOpenCodeAdapter), but:server.jsonly importscreateAllAdapters./providers/copilot)Changes
module.exportsinproviders/index.jsVerification
npm run buildsucceeds./providers(index.js)Closes #2775