Skip to content

update to 1.15 can't remove old LLM model #39559

Closed

Description

@steven0081

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.15.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

i update dify from 1.14 to 1.15 ,new UI is very cool,but when i want to remove old LLM model Ollama provide or OpenAI-API-compatible.
it is show i do success, but there is still display,i can't remove old LLM model, it is still display.

✔️ Expected Behavior

delete old LLM model, in model provider.

❌ Actual Behavior

No response

Activity

  1. dosubot commented on Jul 25, 2026

    @dosubot

    This is a well-documented issue that affects upgrades from older Dify versions. The root cause is that Dify 1.14.x renamed model_type column values in the database (text-generation → llm, embeddings → text-embedding, reranking → rerank) but no data migration was run on existing rows. This causes credential lookups to fail silently — deletions appear to succeed in the UI but the models reappear [1].

    Fix: Run these SQL updates on your PostgreSQL database (back it up first):

    UPDATE provider_models SET model_type = 'llm' WHERE model_type = 'text-generation';
    UPDATE provider_models SET model_type = 'text-embedding' WHERE model_type = 'embeddings';
    UPDATE provider_models SET model_type = 'rerank' WHERE model_type = 'reranking';
    
    UPDATE provider_model_credentials SET model_type = 'llm' WHERE model_type = 'text-generation';
    UPDATE provider_model_credentials SET model_type = 'text-embedding' WHERE model_type = 'embeddings';
    UPDATE provider_model_credentials SET model_type = 'rerank' WHERE model_type = 'reranking';
    
    UPDATE tenant_default_models SET model_type = 'llm' WHERE model_type = 'text-generation';
    UPDATE tenant_default_models SET model_type = 'text-embedding' WHERE model_type = 'embeddings';
    UPDATE tenant_default_models SET model_type = 'rerank' WHERE model_type = 'reranking';
    
    UPDATE provider_model_settings SET model_type = 'llm' WHERE model_type = 'text-generation';
    UPDATE provider_model_settings SET model_type = 'text-embedding' WHERE model_type = 'embeddings';
    UPDATE provider_model_settings SET model_type = 'rerank' WHERE model_type = 'reranking';
    
    UPDATE load_balancing_model_configs SET model_type = 'llm' WHERE model_type = 'text-generation';
    UPDATE load_balancing_model_configs SET model_type = 'text-embedding' WHERE model_type = 'embeddings';
    UPDATE load_balancing_model_configs SET model_type = 'rerank' WHERE model_type = 'reranking';

    If the tenant_default_models UPDATE throws a duplicate key error (SQLSTATE 23505), delete the stale rows first [2]:

    DELETE FROM tenant_default_models
      WHERE tenant_id = '<id>' AND model_type IN ('text-generation','embeddings','reranking');

    After running the SQL fix, uninstall and reinstall the affected model plugins (Ollama, OpenAI-API-compatible) to ensure plugin state is consistent [3]. This has been confirmed working by multiple users who hit the same issue — see #37034 and #38828 [4] [5].

    To reply, just mention @dosu.


    Docs are dead. Just use Dosu.

    Leave Feedback Ask Dosu about dify

  2. steven0081 commented on Jul 25, 2026

    @steven0081
    Author

    thank you very much, this question has resolved at end.i never find the documents before,thanks a lot.

  3. added
    🐞 bug
    on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.15.0🐞 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions