Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Fix: The same model appears twice in the drop-down box. #10102 (#10103)

balibabuc29c3953904c
diff --git a/web/src/hooks/llm-hooks.tsx b/web/src/hooks/llm-hooks.tsx
index 635519d8c4..33a738e979 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);
}