Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Fix/model selector (#1032)

zxhlyh3a5c7c75adc1
diff --git a/web/app/components/datasets/documents/list.tsx b/web/app/components/datasets/documents/list.tsx
index a41277a804c..afbe734ce82 100644
--- a/web/app/components/datasets/documents/list.tsx
+++ b/web/app/components/datasets/documents/list.tsx
@@ -89,7 +89,7 @@ export const StatusItem: FC<{
<Tooltip
selector='dataset-document-detail-item-status'
htmlContent={
- <div className='max-w-[260px]'>{errorMessage}</div>
+ <div className='max-w-[260px] break-all'>{errorMessage}</div>
}
>
<HelpCircle className='ml-1 w-[14px] h-[14px] text-gray-700' />
diff --git a/web/app/components/header/account-setting/model-page/index.tsx b/web/app/components/header/account-setting/model-page/index.tsx
index 22ccfd23b38..163ce28242e 100644
--- a/web/app/components/header/account-setting/model-page/index.tsx
+++ b/web/app/components/header/account-setting/model-page/index.tsx
@@ -122,6 +122,7 @@ const ModelPage = () => {
const handleUpdateProvidersAndModelList = () => {
updateModelList(ModelType.textGeneration)
updateModelList(ModelType.embeddings)
+ updateModelList(ModelType.speech2text)
mutateProviders()
}
const handleSave = async (originValue?: FormValue) => {
diff --git a/web/app/components/header/account-setting/model-page/model-selector/index.tsx b/web/app/components/header/account-setting/model-page/model-selector/index.tsx
index f7c300cdd0c..bde2815cb9b 100644
--- a/web/app/components/header/account-setting/model-page/model-selector/index.tsx
+++ b/web/app/components/header/account-setting/model-page/model-selector/index.tsx
@@ -78,7 +78,7 @@ const ModelSelector: FC<Props> = ({
})
: modelList
- const hasRemoved = value && !modelList.find(({ model_name }) => model_name === value.modelName)
+ const hasRemoved = value && !modelList.find(({ model_name, model_provider }) => model_name === value.modelName && model_provider.provider_name === value.providerName)
const modelOptions: ModelOption[] = (() => {
const providers = _.uniq(filteredModelList.map(item => item.model_provider.provider_name))