Cannot add LLM model and Text Embedding model simultaneously #159

Closed
opened 2026-02-16 10:18:16 -05:00 by yindo · 1 comment
Owner

Originally created by @aitting on GitHub (Mar 31, 2025).

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When adding LLM model and Text Embedding model simultaneously under Ollama, only one can be successfully added. As long as one is successfully added, the other will be automatically invalidated。

  • this is Text Embedding model,Actually, I also added three LLM models

Image

  • When I removed the EMBEDDING model, the LLM model automatically appeared

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @aitting on GitHub (Mar 31, 2025). ### Self Checks - [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 (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.0.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce When adding LLM model and Text Embedding model simultaneously under Ollama, only one can be successfully added. As long as one is successfully added, the other will be automatically invalidated。 - this is Text Embedding model,Actually, I also added three LLM models ![Image](https://github.com/user-attachments/assets/c33507af-45c0-42f1-9061-44cd70b3ddcf) - When I removed the EMBEDDING model, the LLM model automatically appeared ![Image](https://github.com/user-attachments/assets/6675171c-6723-4578-9b7e-4dd29a179455) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:18:16 -05:00
Author
Owner

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

Hello, @aitting! I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together!

To address the issue of not being able to add both LLM and Text Embedding models simultaneously in a self-hosted Docker setup for Dify, consider the following steps:

  1. Model Configuration: Ensure that each model type (LLM and Text Embedding) is configured correctly in separate submodules under the provider module. This involves creating distinct folders for each model type under the /models path, as outlined in the Dify documentation [1].

  2. Model Management: Check if there are any conflicts in the model management settings. Dify uses a snapshot system for model configurations, which might cause issues if models are not properly enabled or disabled. Ensure that the models are not conflicting with each other in terms of configuration settings [2].

  3. Ollama Configuration: Verify that the Ollama service is correctly set up and accessible. Ensure that the base URL and other settings are properly configured for both LLM and Text Embedding models. This includes setting the OLLAMA_HOST environment variable to 0.0.0.0 if needed, especially when using Docker [3].

  4. Logs and Errors: Check the logs for any error messages that might indicate why one model is invalidated when the other is added. This can provide insights into potential conflicts or misconfigurations.

  5. Docker Network: Ensure that the Docker network settings allow for proper communication between the Dify platform and the Ollama service. This might involve checking network configurations and ensuring that the correct ports are open and accessible.

By following these steps, you should be able to troubleshoot and resolve the issue of adding both LLM and Text Embedding models simultaneously.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 31, 2025): <!-- Greeting --> Hello, @aitting! I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together! <!-- Answer --> To address the issue of not being able to add both LLM and Text Embedding models simultaneously in a self-hosted Docker setup for Dify, consider the following steps: 1. **Model Configuration**: Ensure that each model type (LLM and Text Embedding) is configured correctly in separate submodules under the provider module. This involves creating distinct folders for each model type under the `/models` path, as outlined in the Dify documentation <sup>[[1]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/plugins/quick-start/develop-plugins/model-plugin/integrate-the-predefined-model.md)</sup>. 2. **Model Management**: Check if there are any conflicts in the model management settings. Dify uses a snapshot system for model configurations, which might cause issues if models are not properly enabled or disabled. Ensure that the models are not conflicting with each other in terms of configuration settings <sup>[[2]](https://github.com/langgenius/dify/issues/14095)</sup>. 3. **Ollama Configuration**: Verify that the Ollama service is correctly set up and accessible. Ensure that the base URL and other settings are properly configured for both LLM and Text Embedding models. This includes setting the `OLLAMA_HOST` environment variable to `0.0.0.0` if needed, especially when using Docker <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/development/models-integration/ollama.md)</sup>. 4. **Logs and Errors**: Check the logs for any error messages that might indicate why one model is invalidated when the other is added. This can provide insights into potential conflicts or misconfigurations. 5. **Docker Network**: Ensure that the Docker network settings allow for proper communication between the Dify platform and the Ollama service. This might involve checking network configurations and ensuring that the correct ports are open and accessible. By following these steps, you should be able to troubleshoot and resolve the issue of adding both LLM and Text Embedding models simultaneously. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/78e03052-c074-4756-97aa-243be12d8b27?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/78e03052-c074-4756-97aa-243be12d8b27?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/78e03052-c074-4756-97aa-243be12d8b27?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/78e03052-c074-4756-97aa-243be12d8b27?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/78e03052-c074-4756-97aa-243be12d8b27?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/78e03052-c074-4756-97aa-243be12d8b27?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/78e03052-c074-4756-97aa-243be12d8b27?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#159