RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
feat(llm): add decision model type and open it to all providers (#21472)
chanxf5b94a95998a
diff --git a/web/src/constants/llm.ts b/web/src/constants/llm.tsindex 42402aeed4..aaa6d347ee 100644--- a/web/src/constants/llm.ts+++ b/web/src/constants/llm.ts@@ -221,17 +221,13 @@ export const IconMap = {/*** Providers that may serve a given model type.*- * The decision model is spoken to in the TypeSafe System One protocol, which- * only the SystemOne provider implements. Another provider's model would be- * accepted by the picker and then fail on the first call, so the choice is- * narrowed at selection time rather than at request time.- *- * Types without an entry are unrestricted — listing every chat provider here- * would be a second copy of the catalog that goes stale.+ * Types without an entry are unrestricted — listing every provider here would+ * be a second copy of the catalog that goes stale. Decision is intentionally+ * unrestricted: the backend derives the System One endpoint from the selected+ * instance's own base URL, so any provider that serves that path on its+ * instances can offer decision models.*/-export const ModelTypeProviderMap: Record<string, string[]> = {- decision: ['SystemOne'],-};+export const ModelTypeProviderMap: Record<string, string[]> = {};export const ModelTypeToField: Record<string, string> = {chat: 'llm_id',diff --git a/web/src/locales/ar.ts b/web/src/locales/ar.tsindex b6d146cab3..a1a6093abb 100644--- a/web/src/locales/ar.ts+++ b/web/src/locales/ar.ts@@ -1289,6 +1289,7 @@ export default {tts: 'تحويل النص إلى كلام',image2text: 'التعرف الضوئي على الحروف',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'عرض المحتوى',hideToc: 'إخفاء المحتوى',diff --git a/web/src/locales/az.ts b/web/src/locales/az.tsindex 6089ea3b4c..3a441c1d81 100644--- a/web/src/locales/az.ts+++ b/web/src/locales/az.ts@@ -2429,6 +2429,7 @@ Nümunə: Virtual host üslubu`,image2text: 'VLM',ocr: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'Məzmunu göstər',hideToc: 'Məzmunu gizlət',diff --git a/web/src/locales/bg.ts b/web/src/locales/bg.tsindex f0bdee7460..9d4d5a132a 100644--- a/web/src/locales/bg.ts+++ b/web/src/locales/bg.ts@@ -1356,6 +1356,7 @@ The above is the content you need to summarize.`,tts: 'TTS',image2text: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'Покажи съдържание',hideToc: 'Скрий съдържание',diff --git a/web/src/locales/de.ts b/web/src/locales/de.tsindex bfe3af6753..9e5ada7687 100644--- a/web/src/locales/de.ts+++ b/web/src/locales/de.ts@@ -1399,6 +1399,7 @@ Beispiel: Virtual Hosted Style`,tts: 'TTS',image2text: 'Img2txt',speech2text: 'ASR',+ decision: 'Decision',},},message: {diff --git a/web/src/locales/en.ts b/web/src/locales/en.tsindex 745f2ac750..917fd2e90d 100644--- a/web/src/locales/en.ts+++ b/web/src/locales/en.ts@@ -2432,6 +2432,7 @@ Example: Virtual Hosted Style`,image2text: 'VLM',ocr: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'Show content',hideToc: 'Hide content',diff --git a/web/src/locales/fr.ts b/web/src/locales/fr.tsindex 54b060e031..8df459d770 100644--- a/web/src/locales/fr.ts+++ b/web/src/locales/fr.ts@@ -1830,6 +1830,7 @@ Exemple : Virtual Hosted Style`,tts: 'TTS',image2text: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'Afficher le contenu',hideToc: 'Masquer le contenu',diff --git a/web/src/locales/it.ts b/web/src/locales/it.tsindex 6f64c8d924..73e9fe11e7 100644--- a/web/src/locales/it.ts+++ b/web/src/locales/it.ts@@ -1775,6 +1775,7 @@ Esempio: Virtual Hosted Style`,tts: 'TTS',image2text: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'Mostra contenuto',hideToc: 'Nascondi contenuto',diff --git a/web/src/locales/ja.ts b/web/src/locales/ja.tsindex 92246fde87..3e0f65f4be 100644--- a/web/src/locales/ja.ts+++ b/web/src/locales/ja.ts@@ -1768,6 +1768,7 @@ export default {image2text: 'VLM',ocr: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'コンテンツを表示',diff --git a/web/src/locales/ko.ts b/web/src/locales/ko.tsindex b006728f1b..9e00a39fcf 100644--- a/web/src/locales/ko.ts+++ b/web/src/locales/ko.ts@@ -1758,6 +1758,7 @@ export default {tts: 'TTS',image2text: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: '목차 보기',hideToc: '목차 숨기기',diff --git a/web/src/locales/ru.ts b/web/src/locales/ru.tsindex ba6da3def3..6de0dce4f1 100644--- a/web/src/locales/ru.ts+++ b/web/src/locales/ru.ts@@ -1473,6 +1473,7 @@ export default {tts: 'TTS',image2text: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'Показать содержание',hideToc: 'Скрыть содержание',diff --git a/web/src/locales/tr.ts b/web/src/locales/tr.tsindex a2d046a570..509092caa8 100644--- a/web/src/locales/tr.ts+++ b/web/src/locales/tr.ts@@ -2372,6 +2372,7 @@ Bu otomatik etiketleme özelliği, mevcut datasete alanına özgü bilgi katmanimage2text: 'OCR',ocr: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'İçeriği göster',hideToc: 'İçeriği gizle',diff --git a/web/src/locales/uz.ts b/web/src/locales/uz.tsindex a37d98753d..825bb51220 100644--- a/web/src/locales/uz.ts+++ b/web/src/locales/uz.ts@@ -2324,6 +2324,7 @@ export default {image2text: 'VLM',ocr: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},showToc: 'Kontentni ko‘rsatish',hideToc: 'Kontentni yashirish',diff --git a/web/src/locales/zh.ts b/web/src/locales/zh.tsindex ccde9fbb3d..b4daf23974 100644--- a/web/src/locales/zh.ts+++ b/web/src/locales/zh.ts@@ -2037,6 +2037,7 @@ NER:使用 spaCy NER 和基于规则的关键词提取来抽取 Entities 和 Rimage2text: 'VLM',ocr: 'OCR',speech2text: 'ASR',+ decision: 'Decision',},modelFeatures: '模型特性',modelNameRequired: '请输入模型名称',diff --git a/web/src/pages/user-setting/setting-model/instance-card/available-models.tsx b/web/src/pages/user-setting/setting-model/instance-card/available-models.tsxindex bb3ac4ca3e..283bf32e30 100644--- a/web/src/pages/user-setting/setting-model/instance-card/available-models.tsx+++ b/web/src/pages/user-setting/setting-model/instance-card/available-models.tsx@@ -35,6 +35,7 @@ export const mapModelKey = {rerank: 'Rerank',tts: 'TTS',ocr: 'OCR',+ decision: 'Decision',};const orderMap: Record<ModelType, number> = {@@ -47,6 +48,7 @@ const orderMap: Record<ModelType, number> = {image2text: 6,vision: 6,ocr: 7,+ decision: 8,};type ModelType =@@ -58,7 +60,8 @@ type ModelType =| 'speech2text'| 'image2text'| 'vision'- | 'ocr';+ | 'ocr'+ | 'decision';export const sortModelTypes = (modelTypes: string[]) => {return [...modelTypes].sort(diff --git a/web/src/pages/user-setting/setting-model/instance-card/use-custom-model-fields.tsx b/web/src/pages/user-setting/setting-model/instance-card/use-custom-model-fields.tsxindex fb5189c7e4..d6f8311dd8 100644--- a/web/src/pages/user-setting/setting-model/instance-card/use-custom-model-fields.tsx+++ b/web/src/pages/user-setting/setting-model/instance-card/use-custom-model-fields.tsx@@ -49,6 +49,7 @@ export const MODEL_FIELD_SCHEMA: AddCustomModelDialogFields[] = [{ value: 'vision', label: 'modelTypes.image2text' },{ value: 'ocr', label: 'modelTypes.ocr' },{ value: 'asr', label: 'modelTypes.speech2text' },+ { value: 'decision', label: 'modelTypes.decision' },],},{