fix custom API models registry: use endpointsToFetch instead of VLLM_ENDPOINTS for lookup

This commit is contained in:
Russell Ballestrini 2025-07-11 00:11:14 -04:00
parent c96a09c1f1
commit 81a4062b19

View file

@ -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