mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-23 16:34:27 +00:00
@librechat/agents publishes its declaration files with its internal @/* path aliases unrewritten, across 112 files. types/llm.d.ts imports Providers that way, so a consumer cannot resolve it, ProviderOptionsMap's computed keys go unresolved, and keyof ProviderOptionsMap collapses to number. Through v3.6.15 that only degraded LLMConfig silently: provider was typed as the unresolved Providers, so everything assigned. v3.6.16 made SharedLLMConfig generic over that key union, turning provider into number | RuntimeProviderName, which nothing real is assignable to. That is the whole of the "Type check @librechat/api" failure on dev. Declaring the one alias llm.d.ts needs restores the enum and the provider key union, taking the package from 20 errors to 4. The remaining 4 were genuine: custom-endpoint specs pass provider: 'custom', which widens to string, and the SDK models a provider outside ProviderOptionsMap as RuntimeProviderName. Mapping every @/* alias instead was tried and rejected here: it unmasks a backlog of roughly 114 latent errors elsewhere in the package, which is a separate cleanup. The real fix belongs upstream, in what the SDK ships. |
||
|---|---|---|
| .. | ||
| src | ||
| types | ||
| .gitignore | ||
| babel.config.cjs | ||
| jest.config.mjs | ||
| jest.setup.cjs | ||
| package.json | ||
| tsconfig-paths-bootstrap.mjs | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsconfig.spec.json | ||
| tsdown.config.mjs | ||