Error when adding Minimax credentials #964

Closed
opened 2026-02-21 17:29:15 -05:00 by yindo · 1 comment
Owner

Originally created by @ifsheldon on GitHub (Jan 24, 2024).

Originally assigned to: @Yeuoly on GitHub.

Self Checks

Dify version

0.5

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

  1. Open settings
  2. Add MiniMax api-key and groupid
  3. Submit
  4. Get a toast saying "internal server error"

✔️ Expected Behavior

No errors

Actual Behavior

Get a toast saying "internal server error". Reproduced both on cloud.dify.ai and my self-hosted dify

Originally created by @ifsheldon on GitHub (Jan 24, 2024). Originally assigned to: @Yeuoly on GitHub. ### 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 file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Dify version 0.5 ### Cloud or Self Hosted Cloud, Self Hosted (Docker) ### Steps to reproduce 1. Open settings 2. Add MiniMax api-key and groupid 3. Submit 4. Get a toast saying "internal server error" ### ✔️ Expected Behavior No errors ### ❌ Actual Behavior Get a toast saying "internal server error". Reproduced both on cloud.dify.ai and my self-hosted dify
yindo added the 🐞 bug label 2026-02-21 17:29:15 -05:00
yindo closed this issue 2026-02-21 17:29:15 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 24, 2024):

🤖

Hey @ifsheldon! Good to see you again. I hope you're having a good day!

I'm sorry to hear that you're experiencing an issue when adding your MiniMax credentials. Based on the information you've provided, it seems like there might be an issue with the validation or saving of the credentials.

The expected format for the MiniMax api-key in the settings is a 'secret-input', while the format for the groupid is a 'text-input'. This is indicated by the 'type' property of the fields in the 'provider_credential_schema' of the 'minimax.yaml' file. You can refer to these files for more information:

When you add new provider credentials like MiniMax api-key and groupid, dify follows a specific process. The credentials are passed to the ModelProviderApi class's post method as a dictionary. This method checks if the current user's role is either 'admin' or 'owner'. If not, it raises a Forbidden exception. Then, it creates an instance of the ModelProviderService class and calls its save_provider_credentials method, passing the tenant id, provider, and credentials as arguments. If the save_provider_credentials method raises a CredentialsValidateFailedError, the ModelProviderApi class's post method raises a ValueError. You can refer to the model_providers.py file for more information.

Given this, it's possible that the error you're seeing is due to a problem with the credentials you're providing, or a problem with the save_provider_credentials method. To help narrow down the issue, could you please provide more information about the exact credentials you're trying to add (without revealing any sensitive information), and any additional error messages or logs you might have? This will help us better understand the problem and provide a more accurate solution.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot[bot] commented on GitHub (Jan 24, 2024): _🤖_ <!-- Greeting --> Hey @ifsheldon! Good to see you again. I hope you're having a good day! <!-- Answer --> I'm sorry to hear that you're experiencing an issue when adding your MiniMax credentials. Based on the information you've provided, it seems like there might be an issue with the validation or saving of the credentials. The expected format for the MiniMax api-key in the settings is a 'secret-input', while the format for the groupid is a 'text-input'. This is indicated by the 'type' property of the fields in the 'provider_credential_schema' of the 'minimax.yaml' file. You can refer to these files for more information: - [minimax.tsx](https://github.com/langgenius/dify/blob/main/web/app/components/header/account-setting/model-page/configs/minimax.tsx) - [minimax.yaml](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/minimax/minimax.yaml) When you add new provider credentials like MiniMax api-key and groupid, dify follows a specific process. The credentials are passed to the `ModelProviderApi` class's `post` method as a dictionary. This method checks if the current user's role is either 'admin' or 'owner'. If not, it raises a `Forbidden` exception. Then, it creates an instance of the `ModelProviderService` class and calls its `save_provider_credentials` method, passing the tenant id, provider, and credentials as arguments. If the `save_provider_credentials` method raises a `CredentialsValidateFailedError`, the `ModelProviderApi` class's `post` method raises a `ValueError`. You can refer to the [model_providers.py](https://github.com/langgenius/dify/blob/main/api/controllers/console/workspace/model_providers.py) file for more information. Given this, it's possible that the error you're seeing is due to a problem with the credentials you're providing, or a problem with the `save_provider_credentials` method. To help narrow down the issue, could you please provide more information about the exact credentials you're trying to add (without revealing any sensitive information), and any additional error messages or logs you might have? This will help us better understand the problem and provide a more accurate solution. ## Sources - [web/app/components/header/account-setting/model-page/configs/minimax.tsx](https://github.com/langgenius/dify/blob/main/web/app/components/header/account-setting/model-page/configs/minimax.tsx) - [api/core/model_runtime/model_providers/minimax/minimax.yaml](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/minimax/minimax.yaml) - [api/controllers/console/workspace/model_providers.py](https://github.com/langgenius/dify/blob/main/api/controllers/console/workspace/model_providers.py) --- This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#964