Skip to content

Commit 677423d

Browse files
authored
šŸ› fix: Safeguard against undefined length for addedEndpoints in modelSpecs processing (danny-avila#6654)
1 parent 9b6fa89 commit 677423d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ā€Žapi/server/services/start/modelSpecs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function processModelSpecs(endpoints, _modelSpecs, interfaceConfig) {
2121

2222
const customEndpoints = endpoints?.[EModelEndpoint.custom] ?? [];
2323

24-
if (interfaceConfig.modelSelect !== true && _modelSpecs.addedEndpoints.length > 0) {
24+
if (interfaceConfig.modelSelect !== true && (_modelSpecs.addedEndpoints?.length ?? 0) > 0) {
2525
logger.warn(
2626
`To utilize \`addedEndpoints\`, which allows provider/model selections alongside model specs, set \`modelSelect: true\` in the interface configuration.
2727

0 commit comments

Comments
Ā (0)