From 8c28f9b6a69214cc2c34c2ed9d9a13f842324e3f Mon Sep 17 00:00:00 2001 From: Louis Date: Thu, 14 Aug 2025 10:54:40 +0700 Subject: [PATCH] fix: should normalize model ID from source instead of frontend --- web-app/src/routes/hub/index.tsx | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/web-app/src/routes/hub/index.tsx b/web-app/src/routes/hub/index.tsx index 9ec2088df..b27fb2e79 100644 --- a/web-app/src/routes/hub/index.tsx +++ b/web-app/src/routes/hub/index.tsx @@ -139,7 +139,7 @@ function Hub() { filtered = filtered?.filter((model) => model.quants.some((variant) => llamaProvider?.models.some( - (m: { id: string }) => m.id === sanitizeModelId(variant.model_id) + (m: { id: string }) => m.id === variant.model_id ) ) ) @@ -677,8 +677,8 @@ function Hub() { {filteredModels[virtualItem.index].quants.map( (variant) => (

@@ -687,32 +687,19 @@ function Hub() { {(() => { const isDownloading = localDownloadingModels.has( - sanitizeModelId( - variant.model_id - ) + variant.model_id ) || downloadProcesses.some( - (e) => - e.id === - sanitizeModelId( - variant.model_id - ) + (e) => e.id === variant.model_id ) const downloadProgress = downloadProcesses.find( - (e) => - e.id === - sanitizeModelId( - variant.model_id - ) + (e) => e.id === variant.model_id )?.progress || 0 const isDownloaded = llamaProvider?.models.some( (m: { id: string }) => - m.id === - sanitizeModelId( - variant.model_id - ) + m.id === variant.model_id ) if (isDownloading) { @@ -746,9 +733,7 @@ function Hub() { size="sm" onClick={() => handleUseModel( - sanitizeModelId( - variant.model_id - ) + variant.model_id ) } >