Description
models.config.mjs:180-211 defines three legacy exports that are not used anywhere in the codebase:
// Legacy exports for backward compatibility (can be removed in v2.0)
export const modelLimitsOverrides = Object.fromEntries(
Object.entries(SUPPORTED_MODELS)
.filter(([_, config]) => config.limit)
.map(([name, config]) => [name, config.limit])
);
export const modelCostsDefaults = Object.fromEntries(
Object.entries(SUPPORTED_MODELS)
.filter(([_, config]) => config.cost)
.map(([name, config]) => [name, config.cost])
);
export const modelVariants = {
claude: { low: {...}, high: {...} },
gemini: { low: {...}, high: {...} },
geminiPro: { low: {...}, high: {...} },
gptReasoning: { low: {...}, high: {...} },
};
Evidence of non-use
Searching the codebase:
modelLimitsOverrides — not imported or referenced outside its own declaration.
modelCostsDefaults — not imported or referenced outside its own declaration.
modelVariants — not imported or referenced outside its own declaration.
- No external package depends on these exports (this is a CLI tool, not a library consumed by other packages).
Impact
- These objects are computed on every module import (
Object.fromEntries + Object.entries + filter + map), even though they're never used.
- The
modelVariants object duplicates data already present in SUPPORTED_MODELS per-model configs, creating a synchronization risk — if someone updates a model's variants in SUPPORTED_MODELS but forgets modelVariants, they silently diverge.
- The comment "can be removed in v2.0" suggests this was planned for removal. The current version is 1.17.1.
Proposed fix
Remove all three exports. Since the package version is 1.x and these are documented as legacy, they should be safe to remove in a minor version with a note in CHANGELOG.
If external consumers might theoretically depend on them via direct import of models.config.mjs, consider:
- Checking npm download stats to see if anyone uses this as a library.
- Removing in the next major version bump.
Acceptance criteria
🤖 Generated with Claude Code
Description
models.config.mjs:180-211defines three legacy exports that are not used anywhere in the codebase:Evidence of non-use
Searching the codebase:
modelLimitsOverrides— not imported or referenced outside its own declaration.modelCostsDefaults— not imported or referenced outside its own declaration.modelVariants— not imported or referenced outside its own declaration.Impact
Object.fromEntries+Object.entries+filter+map), even though they're never used.modelVariantsobject duplicates data already present inSUPPORTED_MODELSper-model configs, creating a synchronization risk — if someone updates a model's variants inSUPPORTED_MODELSbut forgetsmodelVariants, they silently diverge.Proposed fix
Remove all three exports. Since the package version is 1.x and these are documented as legacy, they should be safe to remove in a minor version with a note in CHANGELOG.
If external consumers might theoretically depend on them via direct
importofmodels.config.mjs, consider:Acceptance criteria
modelLimitsOverrides,modelCostsDefaults, andmodelVariantsare removed frommodels.config.mjs.🤖 Generated with Claude Code