After upgrading to v1.8.0, Ollama model settings cannot be edited #602

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

Originally created by @gakugaku on GitHub (Aug 29, 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 Dify issues & Dify Official Plugins, 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.8.0

Plugin version

0.0.7

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Upgrade Dify from v1.7.2 to v1.8.0 (environment contains Ollama models).
  2. In Model Providers → Add Model, choose provider Ollama and select an existing credential (e.g. API_KEY1).
  3. The following error occurs:
    • Credential with id xxxxx not found.
    • The Add model credential form is missing fields: Base URL, Model context size, and Upper bound for max tokens.
    • Because of the missing fields, the model cannot be saved.

Note

  • Ollama models created in v1.7.2 can still run successfully in v1.8.0, but cannot be edited.
  • Newly created Ollama models in v1.8.0 can be edited without any issue.

✔️ Error log

Image

No related logs were recorded during the error in the following containers

  • docker container logs aitool_develop-dify-api-1
  • docker container logs aitool_develop-dify-web-1
  • docker container logs aitool_develop-dify-db-1
Originally created by @gakugaku on GitHub (Aug 29, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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.8.0 ### Plugin version 0.0.7 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Upgrade Dify from **v1.7.2** to **v1.8.0** (environment contains Ollama models). 2. In Model Providers → Add Model, choose provider Ollama and select an existing credential (e.g. `API_KEY1`). 3. The following error occurs: * `Credential with id xxxxx not found.` * The **Add model credential** form is missing fields: **Base URL**, **Model context size**, and **Upper bound for max tokens**. * Because of the missing fields, the model cannot be saved. #### Note * Ollama models created in v1.7.2 can still run successfully in v1.8.0, but cannot be edited. * Newly created Ollama models in v1.8.0 can be edited without any issue. ### ✔️ Error log <img width="1756" height="735" alt="Image" src="https://github.com/user-attachments/assets/391fc1f9-acd9-45b2-acb5-8df3595cc995" /> No related logs were recorded during the error in the following containers * `docker container logs aitool_develop-dify-api-1` * `docker container logs aitool_develop-dify-web-1` * `docker container logs aitool_develop-dify-db-1`
yindo added the bug label 2026-02-16 10:19:52 -05:00
yindo closed this issue 2026-02-16 10:19:52 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 29, 2025):

This issue is caused by breaking changes in Dify v1.8.0's credential management. The upgrade introduced new tables (provider_credentials, provider_model_credentials) and migration scripts that move credential data and assign new credential IDs. If the migration was incomplete or references are broken, migrated Ollama models may reference credential IDs that no longer exist, resulting in the "Credential with id xxxxx not found" error and missing form fields like Base URL, context size, and max tokens. Newly created models work because their credentials are correctly registered in the new tables.

To fix this, you’ll need to manually inspect your database and ensure that each migrated Ollama model’s credential_id in the provider_models table matches a valid entry in provider_model_credentials. If not, you can create a new credential entry and update the reference. Also, make sure all required fields are present in the credential record. This will restore the edit functionality for migrated models. For details on the migration scripts and schema changes, see PR #24451 and PR #24545.

If you need a step-by-step SQL outline for this fix, let me know your database type and I can help draft it.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 29, 2025): <!-- Answer --> This issue is caused by breaking changes in Dify v1.8.0's credential management. The upgrade introduced new tables (`provider_credentials`, `provider_model_credentials`) and migration scripts that move credential data and assign new credential IDs. If the migration was incomplete or references are broken, migrated Ollama models may reference credential IDs that no longer exist, resulting in the "Credential with id xxxxx not found" error and missing form fields like Base URL, context size, and max tokens. Newly created models work because their credentials are correctly registered in the new tables. To fix this, you’ll need to manually inspect your database and ensure that each migrated Ollama model’s `credential_id` in the `provider_models` table matches a valid entry in `provider_model_credentials`. If not, you can create a new credential entry and update the reference. Also, make sure all required fields are present in the credential record. This will restore the edit functionality for migrated models. For details on the migration scripts and schema changes, see [PR #24451](https://github.com/langgenius/dify/pull/24451) and [PR #24545](https://github.com/langgenius/dify/pull/24545). If you need a step-by-step SQL outline for this fix, let me know your database type and I can help draft it. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/6d47d402-3177-42c4-8fd3-bddd45575910?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/6d47d402-3177-42c4-8fd3-bddd45575910?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/6d47d402-3177-42c4-8fd3-bddd45575910?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/6d47d402-3177-42c4-8fd3-bddd45575910?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6d47d402-3177-42c4-8fd3-bddd45575910?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/6d47d402-3177-42c4-8fd3-bddd45575910?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6d47d402-3177-42c4-8fd3-bddd45575910?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify-official-plugins/issues/1615)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#602