Skip to content

[Bug] "Credentials unavailable" error on all pre-configured local LLM models in Docker deployment #37520

Closed

Description

@xiaolvtongxue-zt

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

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Dify deployed with Docker Compose. Local LLM models configured previously worked fine without any credential/endpoint modification. Now all local model providers show Credentials unavailable error and cannot pass connection test.
1-Deploy Dify using official docker-compose
2-Configure local LLM (Ollama/vLLM/Xinference etc.), test connection and save successfully
3-Reopen model config page after container restart or some time later
4-Error "Credentials unavailable" pops up, model cannot be used

Image

✔️ Expected Behavior

Local model providers without API keys should retain valid credentials state.

❌ Actual Behavior

System marks all saved local models as invalid credentials automatically.

Activity

  1. dosubot commented on Jun 16, 2026

    @dosubot

    This is a reported issue affecting Dify 1.14.x deployments. The root cause is that legacy model_type values in the database (text-generation, embeddings, reranking) are no longer recognized after upgrading to 1.14.x, which now expects the enum values llm, text-embedding, and rerank [1]. This mismatch causes the credential lookup to fail, resulting in the "Credentials unavailable" error even though your configuration hasn't changed.

    Fix: Run the following SQL updates on your PostgreSQL database to normalize the legacy values:

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

    Note: If you get a duplicate key error on tenant_default_models, delete the old rows with the legacy model_type values first for that tenant, then retry [1].

    After running the SQL fix, you may also want to remove and reinstall the affected model plugins (Ollama, OpenAI-API-compatible, etc.) from the marketplace to ensure the plugin state is clean.

    See #36129 for more details and discussion from other users who resolved the same issue.

    To reply, just mention @dosu.


    Share context across your team and agents. Try Dosu.

    Leave Feedback Learn about dify with Dosu

  2. xiaolvtongxue-zt commented on Jun 17, 2026

    @xiaolvtongxue-zt
    Author

    This is a reported issue affecting Dify 1.14.x deployments. The root cause is that legacy model_type values in the database (text-generation, embeddings, reranking) are no longer recognized after upgrading to 1.14.x, which now expects the enum values llm, text-embedding, and rerank [1]. This mismatch causes the credential lookup to fail, resulting in the "Credentials unavailable" error even though your configuration hasn't changed.这是影响 Dify 1.14.x 部署的报告问题。根本原因是数据库**中的遗留 model_type 值 **(文本生成 、嵌入、重新排序)在升级到 1.14.x 后不再被识别,而 1.14.x 现在期望的枚举值是 LLM、 文本嵌入和重新排序 [1]。 这种不匹配会导致凭证查询失败,出现“凭证不可用”错误,尽管你的配置没有变化。

    Fix: Run the following SQL updates on your PostgreSQL database to normalize the legacy values:修复方法: 在你的 PostgreSQL 数据库上运行以下 SQL 更新,以规范遗留值:

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

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

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

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

    UPDATE load_balancing_model_configs SET model_type = 'rerank' WHERE model_type = 'reranking';
    UPDATE load_balancing_model_configs SET model_type = 'text-embedding' WHERE model_type = 'embeddings';
    UPDATE load_balancing_model_configs SET model_type = 'llm' WHERE model_type = 'text-generation';
    Note: If you get a duplicate key error on tenant_default_models, delete the old rows with the legacy model_type values first for that tenant, then retry [1].注: 如果 tenant_default_models 出现重复键错误,先删除该租户的旧行,model_type 旧行,然后重试 [1]。

    After running the SQL fix, you may also want to remove and reinstall the affected model plugins (Ollama, OpenAI-API-compatible, etc.) from the marketplace to ensure the plugin state is clean.运行 SQL 修复后,你也可以从市场上**移除并重新安装受影响的模型插件 **(Ollama、OpenAI-API 兼容等),以确保插件状态干净。

    See #36129 for more details and discussion from other users who resolved the same issue.更多细节和其他解决相同问题用户的讨论,请参见 #36129。

    To reply, just mention @dosu.回复时,只需提及 @dosu。

    Share context across your team and agents. Try Dosu.在团队和经纪人之间分享背景信息。试试土须 。

    Leave Feedback Learn about dify with Dosu

    Adopting this method does resolve the problem effectively.

  3. added
    1.14.0
    on Jun 23, 2026
  4. QuantumGhost commented on Jul 3, 2026

    @QuantumGhost
    Member

    Closed in #36520

  5. 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.14.0project#dify🐞 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions