Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings/Model Provider/Ollama Model status is always green even if the model is removed on server #5648

Open
5 tasks done
Ewen2015 opened this issue Jun 26, 2024 · 1 comment
Assignees
Labels
🐞 bug Something isn't working

Comments

@Ewen2015
Copy link

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).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.11

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. On the model host server.

ollama rm llama

  1. In Dify.

Settings
Model Provider
Models
Ollama

Model status is always green even if the model is removed from the server.

✔️ Expected Behavior

Model status turns to red when a model is removed.

❌ Actual Behavior

Model status is always green even if the model is removed from the server.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Jun 26, 2024
Copy link

dosubot bot commented Jun 26, 2024

Hello, @Ewen2015! I'm here to assist you with any bugs, questions, or contributions you may have. Let's work together to tackle the issue you've encountered.

The issue you're experiencing with the model status remaining green even after the model is removed from the server might be due to a caching mechanism in place. The LBModelManager class uses Redis to manage load balancing configurations and their cooldown states, which could cause the model status to remain green if the cache is not properly invalidated when the model is removed [1].

Additionally, the ModelProviderService class handles model management, including enabling and disabling models. When a model is removed, the remove_model_credentials method is called, which should ideally invalidate the cache. However, if the cache is not properly invalidated, the model status might remain green [2].

To address this issue, you may need to ensure that the cache is properly invalidated when a model is removed. This can be done by using the delete method in the ProviderCredentialsCache class to delete cached model provider credentials [3].

To continue talking to Dosu, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants