datasets embedding model change problem #20061

Closed
opened 2026-02-21 20:05:41 -05:00 by yindo · 1 comment
Owner

Originally created by @lcedaw on GitHub (Oct 31, 2025).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.9.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

In dataset settings page, when change embedding model and save the dataset settings, the retrieval config -> weights -> vector_settings -> embedding does not change accordingly. I will fix it

✔️ Expected Behavior

the retrieval config -> weights -> vector_settings -> embedding should be change and same with the dataset embedding model

Actual Behavior

Image the retrieval config -> weights -> vector_settings -> embedding not same with the dataset embedding model
Originally created by @lcedaw on GitHub (Oct 31, 2025). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.9.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce In dataset settings page, when change embedding model and save the dataset settings, the retrieval config -> weights -> vector_settings -> embedding does not change accordingly. I will fix it ### ✔️ Expected Behavior the retrieval config -> weights -> vector_settings -> embedding should be change and same with the dataset embedding model ### ❌ Actual Behavior <img width="1533" height="841" alt="Image" src="https://github.com/user-attachments/assets/2b2e7a58-0dc1-4730-b06c-fc85bcf6db78" /> the retrieval config -> weights -> vector_settings -> embedding not same with the dataset embedding model
yindo added the 🐞 bug label 2026-02-21 20:05:41 -05:00
yindo closed this issue 2026-02-21 20:05:41 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 31, 2025):

This is a known bug in Dify v1.9.2: when you change the embedding model in the dataset settings, the retrieval config's weights.vector_settings.embedding does not automatically update to match the new embedding model, leading to inconsistencies in retrieval operations. This issue has been reported and discussed in several places, confirming that embedding model changes can cause downstream errors if not properly synchronized across all components, and that Dify's design expects the embedding model to be tightly coupled to the stored vectors for data integrity reasons [issue #12913][discussion #23854].

Recent code review shows that in the dataset settings form, the frontend does attempt to update the retrieval config's embedding provider and model to match the dataset's embedding model before saving. However, if you are still seeing a mismatch, it may be due to a missing or incomplete synchronization step in the backend or a UI state issue [code reference].

The recommended approach is to ensure that whenever the embedding model is changed in the dataset settings, the retrieval config is also updated to use the same embedding model and provider. After changing the embedding model, all documents in the dataset should be re-embedded to avoid vector dimension mismatches, and you may need to wait for background re-embedding processes to complete before the change is fully reflected in retrieval [issue #16280].

If you are implementing a fix, focus on making sure the backend update flow for dataset settings also propagates the new embedding model to the retrieval config, keeping them in sync. This will prevent inconsistencies and errors in downstream retrieval and search operations.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Oct 31, 2025): <!-- Answer --> This is a known bug in Dify v1.9.2: when you change the embedding model in the dataset settings, the retrieval config's `weights.vector_settings.embedding` does not automatically update to match the new embedding model, leading to inconsistencies in retrieval operations. This issue has been reported and discussed in several places, confirming that embedding model changes can cause downstream errors if not properly synchronized across all components, and that Dify's design expects the embedding model to be tightly coupled to the stored vectors for data integrity reasons [[issue #12913](https://github.com/langgenius/dify/issues/12913)][[discussion #23854](https://github.com/langgenius/dify/discussions/23854)]. Recent code review shows that in the dataset settings form, the frontend does attempt to update the retrieval config's embedding provider and model to match the dataset's embedding model before saving. However, if you are still seeing a mismatch, it may be due to a missing or incomplete synchronization step in the backend or a UI state issue [[code reference](https://github.com/langgenius/dify/blob/f7f6b4a8b0029dfd57cb7f3ef1e59f7cb5f09003/web/app/components/datasets/settings/form/index.tsx)]. The recommended approach is to ensure that whenever the embedding model is changed in the dataset settings, the retrieval config is also updated to use the same embedding model and provider. After changing the embedding model, all documents in the dataset should be re-embedded to avoid vector dimension mismatches, and you may need to wait for background re-embedding processes to complete before the change is fully reflected in retrieval [[issue #16280](https://github.com/langgenius/dify/issues/16280)]. If you are implementing a fix, focus on making sure the backend update flow for dataset settings also propagates the new embedding model to the retrieval config, keeping them in sync. This will prevent inconsistencies and errors in downstream retrieval and search operations. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/0b36643a-93bd-49ab-9519-46f2997570ea?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/0b36643a-93bd-49ab-9519-46f2997570ea?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/0b36643a-93bd-49ab-9519-46f2997570ea?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/0b36643a-93bd-49ab-9519-46f2997570ea?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0b36643a-93bd-49ab-9519-46f2997570ea?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/0b36643a-93bd-49ab-9519-46f2997570ea?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0b36643a-93bd-49ab-9519-46f2997570ea?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/27693)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#20061