From 1a492ec981b38d6acc3f0fe102e9f8bce6bcfed5 Mon Sep 17 00:00:00 2001 From: Liu Date: Mon, 16 Dec 2024 11:38:57 +0000 Subject: [PATCH] fix: correct the model list on the model provider's page --- src/server/services/discover/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/services/discover/index.ts b/src/server/services/discover/index.ts index e4001ee1d60d..ae0c9bf7f946 100644 --- a/src/server/services/discover/index.ts +++ b/src/server/services/discover/index.ts @@ -328,7 +328,10 @@ export class DiscoverService { getModelById = async (locale: Locales, id: string): Promise => { const list = await this.getModelList(locale); - let model = list.find((item) => item.identifier === id); + let model = list.find((item) => { + const ids = item.identifier.split('/'); + return ids[1] === id || item.identifier === id; + }); if (!model) return;