From c29c3953904cfa870ef7b5315b66654789b7bf4f Mon Sep 17 00:00:00 2001 From: balibabu Date: Mon, 15 Sep 2025 16:38:08 +0800 Subject: [PATCH] Fix: The same model appears twice in the drop-down box. #10102 (#10103) ### What problem does this PR solve? Fix: The same model appears twice in the drop-down box. #10102 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- web/src/hooks/llm-hooks.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/hooks/llm-hooks.tsx b/web/src/hooks/llm-hooks.tsx index 635519d8c..33a738e97 100644 --- a/web/src/hooks/llm-hooks.tsx +++ b/web/src/hooks/llm-hooks.tsx @@ -155,7 +155,12 @@ export const useComposeLlmOptionsByModelTypes = ( options.forEach((x) => { const item = pre.find((y) => y.label === x.label); if (item) { - item.options.push(...x.options); + x.options.forEach((y) => { + // A model that is both an image2text and speech2text model + if (!item.options.some((z) => z.value === y.value)) { + item.options.push(y); + } + }); } else { pre.push(x); }