如何在模型供应商中删除待配置的模型 #14377

Closed
opened 2026-02-21 19:16:58 -05:00 by yindo · 3 comments
Owner

Originally created by @yihao5un on GitHub (Jun 3, 2025).

Self Checks

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

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Image

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @yihao5un on GitHub (Jun 3, 2025). ### Self Checks - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/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. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. <img width="881" alt="Image" src="https://github.com/user-attachments/assets/ad758939-393c-45ec-94df-042ba63fd116" /> ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo closed this issue 2026-02-21 19:16:58 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 3, 2025):

Hi @yihao5un! I'm Dosu and I’m helping the dify team.

To delete a model configuration from a model provider in Dify, you need to remove the model credentials associated with that model. This action is handled by the backend API and requires admin or owner permissions.

There is no explicit "pending" state for model configurations in Dify; models are either active, disabled, or simply have credentials stored or not. If you see a model listed as "待配置" (pending configuration), it likely means the credentials have not been set or completed.

Here’s how the deletion process works:

  1. You must be an admin or owner to perform this action.
  2. Use the API endpoint for deleting a model configuration, which expects the provider, model, and model_type as parameters.
  3. The backend will call the remove_model_credentials method to delete the credentials for the specified model and provider. This effectively removes the model configuration from your workspace.

The relevant logic is implemented in the ModelProviderModelApi class, specifically its delete method, which checks your permissions and then removes the model credentials using the ModelProviderService class. You can see the implementation details here and here.

If you are using the Dify UI, look for a delete or remove option next to the model in the model provider management section. If you are using the API directly, send a DELETE request to the appropriate endpoint with the required parameters.

If you need more specific instructions for the UI or API usage, please provide more details about your environment or workflow.

To reply, just mention my name @dosu.


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

@dosubot[bot] commented on GitHub (Jun 3, 2025): <!-- Greeting --> Hi @yihao5un! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> To delete a model configuration from a model provider in Dify, you need to remove the model credentials associated with that model. This action is handled by the backend API and requires admin or owner permissions. There is no explicit "pending" state for model configurations in Dify; models are either active, disabled, or simply have credentials stored or not. If you see a model listed as "待配置" (pending configuration), it likely means the credentials have not been set or completed. Here’s how the deletion process works: 1. You must be an admin or owner to perform this action. 2. Use the API endpoint for deleting a model configuration, which expects the `provider`, `model`, and `model_type` as parameters. 3. The backend will call the `remove_model_credentials` method to delete the credentials for the specified model and provider. This effectively removes the model configuration from your workspace. The relevant logic is implemented in the `ModelProviderModelApi` class, specifically its `delete` method, which checks your permissions and then removes the model credentials using the `ModelProviderService` class. You can see the implementation details [here](https://github.com/langgenius/dify/blob/d6b30efe2c3a0ac258e9be982861c2102a7764d2/api/controllers/console/workspace/models.py) and [here](https://github.com/langgenius/dify/blob/d6b30efe2c3a0ac258e9be982861c2102a7764d2/api/services/model_provider_service.py). If you are using the Dify UI, look for a delete or remove option next to the model in the model provider management section. If you are using the API directly, send a DELETE request to the appropriate endpoint with the required parameters. If you need more specific instructions for the UI or API usage, please provide more details about your environment or workflow. <!-- Dosu Comment Footer --> *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/21bd9f72-10d4-4535-8773-ffdf3fe8beba?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/21bd9f72-10d4-4535-8773-ffdf3fe8beba?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/21bd9f72-10d4-4535-8773-ffdf3fe8beba?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/21bd9f72-10d4-4535-8773-ffdf3fe8beba?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/21bd9f72-10d4-4535-8773-ffdf3fe8beba?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/21bd9f72-10d4-4535-8773-ffdf3fe8beba?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/21bd9f72-10d4-4535-8773-ffdf3fe8beba?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/issues/20570)
Author
Owner

@mfgcs commented on GitHub (Jun 3, 2025):

Click on the plug-in on the left side of the user in the upper right corner, find the installed plug-in, and the administrator has the authority to delete the plug-in; first confirm whether the account using the plug-in has administrator privileges, and then delete the plug-in carefully to make sure it is not in use.

Image
@mfgcs commented on GitHub (Jun 3, 2025): Click on the plug-in on the left side of the user in the upper right corner, find the installed plug-in, and the administrator has the authority to delete the plug-in; first confirm whether the account using the plug-in has administrator privileges, and then delete the plug-in carefully to make sure it is not in use. <img width="711" alt="Image" src="https://github.com/user-attachments/assets/d56e2ba4-8299-45a5-8d6d-ba99316eda36" />
Author
Owner

@crazywoola commented on GitHub (Jun 3, 2025):

I confirm that I am using English to submit this report (我已阅读并同意 https://github.com/langgenius/dify/issues/1542).

@crazywoola commented on GitHub (Jun 3, 2025): I confirm that I am using English to submit this report (我已阅读并同意 https://github.com/langgenius/dify/issues/1542).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14377