From 81a4062b19cb692024cf63f9275ca0aa51cb6df3 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Fri, 11 Jul 2025 00:11:14 -0400 Subject: [PATCH] fix custom API models registry: use endpointsToFetch instead of VLLM_ENDPOINTS for lookup --- src/models.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/models.js b/src/models.js index 9197e4f..f6d71be 100644 --- a/src/models.js +++ b/src/models.js @@ -77,10 +77,13 @@ export async function fetchModelsFromEndpoints() { // Update modelRegistry with unique model instances models.forEach((model) => { - modelRegistry[model.uniqueId] = { - url: VLLM_ENDPOINTS.find((e) => e.id === model.endpointId).url, - endpointId: model.endpointId, - }; + const endpoint = endpointsToFetch.find((e) => e.id === model.endpointId); + if (endpoint) { + modelRegistry[model.uniqueId] = { + url: endpoint.url, + endpointId: model.endpointId, + }; + } }); // Cache the results