API Surface Issue
Category
Unused export
Summary
- File:
containers/api-proxy/providers/index.js
- Symbols:
createOpenAIAdapter, createAnthropicAdapter, createCopilotAdapter, createGeminiAdapter, createOpenCodeAdapter
- Issue: Five individual adapter factory functions are re-exported from
providers/index.js but no file ever imports them from that path. server.js imports only createAllAdapters, and every test file that needs individual adapters imports directly from the individual provider files.
Evidence
// containers/api-proxy/providers/index.js — current module.exports (lines 122–129)
module.exports = {
createAllAdapters, // ✅ used by server.js
createOpenAIAdapter, // ❌ nobody imports this from providers/index
createAnthropicAdapter, // ❌ nobody imports this from providers/index
createCopilotAdapter, // ❌ nobody imports this from providers/index
createGeminiAdapter, // ❌ nobody imports this from providers/index
createOpenCodeAdapter, // ❌ nobody imports this from providers/index
};
# server.js — only consumer of providers/index.js
containers/api-proxy/server.js:121:
const { createAllAdapters } = require('./providers');
# Test files import individual adapters directly from provider files, NOT from index:
containers/api-proxy/server.test.js:
const { createCopilotAdapter } = require('./providers/copilot');
const { createAnthropicAdapter } = require('./providers/anthropic');
const { createOpenCodeAdapter } = require('./providers/opencode');
containers/api-proxy/oidc-token-provider.test.js:220:
const { createOpenAIAdapter } = require('./providers/openai');
# No file does: require('./providers').createOpenAIAdapter (etc.)
$ grep -rn "require.*['\"]\.\/providers['\"]" containers/api-proxy/ | grep -v node_modules
containers/api-proxy/server.js:121:const { createAllAdapters } = require('./providers');
# ← only one consumer, and it only destructures createAllAdapters
Recommended Fix
Narrow module.exports in providers/index.js to only expose createAllAdapters:
module.exports = {
createAllAdapters,
};
Tests that need individual adapters should continue to import directly from the individual provider files (which is already what they do). This removes 5 dead re-exports without changing any production or test behaviour.
Impact
- Dead code risk: Medium — the five extra exports widen the
providers module's public contract, making it harder to safely rename or refactor individual adapter factories without worrying about external consumers of the index barrel.
- Maintenance burden: Low — removing the re-exports is a one-line change with zero downstream impact given no file currently consumes them from
providers/index.js.
Detected by Export Audit workflow. Triggered by push to main on 2026-05-08
Generated by API Surface & Export Audit · ● 886.6K · ◷
API Surface Issue
Category
Unused export
Summary
containers/api-proxy/providers/index.jscreateOpenAIAdapter,createAnthropicAdapter,createCopilotAdapter,createGeminiAdapter,createOpenCodeAdapterproviders/index.jsbut no file ever imports them from that path.server.jsimports onlycreateAllAdapters, and every test file that needs individual adapters imports directly from the individual provider files.Evidence
Recommended Fix
Narrow
module.exportsinproviders/index.jsto only exposecreateAllAdapters:Tests that need individual adapters should continue to import directly from the individual provider files (which is already what they do). This removes 5 dead re-exports without changing any production or test behaviour.
Impact
providersmodule's public contract, making it harder to safely rename or refactor individual adapter factories without worrying about external consumers of the index barrel.providers/index.js.Detected by Export Audit workflow. Triggered by push to main on 2026-05-08