You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] "Credentials unavailable" error on all pre-configured local LLM models in Docker deployment #37520
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
✔️ 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.
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.
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。
Activity
dosubot commentedon Jun 16, 2026
This is a reported issue affecting Dify 1.14.x deployments. The root cause is that legacy
model_typevalues in the database (text-generation,embeddings,reranking) are no longer recognized after upgrading to 1.14.x, which now expects the enum valuesllm,text-embedding, andrerank[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:
Note: If you get a duplicate key error on
tenant_default_models, delete the old rows with the legacymodel_typevalues 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.
xiaolvtongxue-zt commentedon Jun 17, 2026
Adopting this method does resolve the problem effectively.
QuantumGhost commentedon Jul 3, 2026
Closed in #36520