Unable to set Azure OpenAI Service Model in cloud.dify.ai, it shows 'Internal Server Error' #295

Closed
opened 2026-02-16 10:18:51 -05:00 by yindo · 3 comments
Owner

Originally created by @HugoChaan on GitHub (May 19, 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 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.

Dify version

1.4.0

Cloud or Self Hosted

Cloud

Steps to reproduce

I filled in the Azure openai URL and key as required, and then clicked OK. I can successfully set the same operation on the self deployed dify

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @HugoChaan on GitHub (May 19, 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 [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. ### Dify version 1.4.0 ### Cloud or Self Hosted Cloud ### Steps to reproduce I filled in the Azure openai URL and key as required, and then clicked OK. I can successfully set the same operation on the self deployed dify <img width="1045" alt="Image" src="https://github.com/user-attachments/assets/6e802495-f27c-48d7-b99b-cd2de58c2276" /> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:18:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 19, 2025):

The 500 Internal Server Error you're encountering when setting up the Azure OpenAI Service Model in Dify's cloud environment can be caused by several factors. Here are some steps to troubleshoot and potentially resolve the issue:

  1. Timeout Configuration: Ensure that the timeout settings are correctly configured. You might need to adjust the PLUGIN_MAX_EXECUTION_TIMEOUT in the docker-compose.yaml file if applicable, although this is more relevant for self-hosted setups [1].

  2. Proxy Settings: Check if there are any proxy settings in the configuration that might be causing issues. Removing or adjusting these settings could help [1].

  3. Model Provider Version: Verify that you are using the correct version of the model provider plugin. Using an incorrect version can lead to errors [1].

  4. Environment Configuration: Ensure that the environment configuration is properly set up. This includes having the necessary environment files and settings in place [1].

  5. API Key Encryption: A 401 Unauthorized error suggests an issue with API key authentication. Ensure that the API key is correctly configured and that encryption keys are properly set up. You may need to reset the encryption keys using the reset_encrypt_key_pair command and re-enter your API key in the Model Providers settings [2].

  6. Error Logs: Check the API container logs for detailed error messages. These logs can provide insights into the specific cause of the 500 Internal Server Error [3].

By following these steps, you should be able to identify and resolve the issue causing the Internal Server Error.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (May 19, 2025): <!-- Answer --> The 500 Internal Server Error you're encountering when setting up the Azure OpenAI Service Model in Dify's cloud environment can be caused by several factors. Here are some steps to troubleshoot and potentially resolve the issue: 1. **Timeout Configuration**: Ensure that the timeout settings are correctly configured. You might need to adjust the `PLUGIN_MAX_EXECUTION_TIMEOUT` in the `docker-compose.yaml` file if applicable, although this is more relevant for self-hosted setups <sup>[[1]](https://github.com/langgenius/dify/issues/14654)</sup>. 2. **Proxy Settings**: Check if there are any proxy settings in the configuration that might be causing issues. Removing or adjusting these settings could help <sup>[[1]](https://github.com/langgenius/dify/issues/14654)</sup>. 3. **Model Provider Version**: Verify that you are using the correct version of the model provider plugin. Using an incorrect version can lead to errors <sup>[[1]](https://github.com/langgenius/dify/issues/14654)</sup>. 4. **Environment Configuration**: Ensure that the environment configuration is properly set up. This includes having the necessary environment files and settings in place <sup>[[1]](https://github.com/langgenius/dify/issues/14654)</sup>. 5. **API Key Encryption**: A 401 Unauthorized error suggests an issue with API key authentication. Ensure that the API key is correctly configured and that encryption keys are properly set up. You may need to reset the encryption keys using the `reset_encrypt_key_pair` command and re-enter your API key in the Model Providers settings <sup>[[2]](https://github.com/langgenius/dify/issues/14074)</sup>. 6. **Error Logs**: Check the API container logs for detailed error messages. These logs can provide insights into the specific cause of the 500 Internal Server Error <sup>[[3]](https://github.com/langgenius/dify/issues/18506)</sup>. By following these steps, you should be able to identify and resolve the issue causing the Internal Server Error. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/54b395ec-3fb4-4abf-b8fb-0d2166c1f0c8?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/54b395ec-3fb4-4abf-b8fb-0d2166c1f0c8?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/54b395ec-3fb4-4abf-b8fb-0d2166c1f0c8?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/54b395ec-3fb4-4abf-b8fb-0d2166c1f0c8?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/54b395ec-3fb4-4abf-b8fb-0d2166c1f0c8?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/54b395ec-3fb4-4abf-b8fb-0d2166c1f0c8?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/54b395ec-3fb4-4abf-b8fb-0d2166c1f0c8?feedback_type=other)</sup>
Author
Owner

@imharvol commented on GitHub (Jun 2, 2025):

I can replicate. When I enter my credentials in dify.ai, I get a "Internal Server Error" whereas when I put them into a self hosted docker compose, it works fine.

@imharvol commented on GitHub (Jun 2, 2025): I can replicate. When I enter my credentials in dify.ai, I get a "Internal Server Error" whereas when I put them into a self hosted docker compose, it works fine.
Author
Owner

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

Hi, @HugoChaan. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary

  • You reported an "Internal Server Error" when using the Azure OpenAI Service model on Dify version 1.4.0 cloud service.
  • The same configuration works correctly on self-hosted deployments.
  • Another user confirmed the issue occurs on dify.ai but not on self-hosted instances.
  • Troubleshooting suggestions included checking timeouts, proxy settings, model provider versions, environment setup, API key encryption, and API container logs.
  • The problem seems specific to the cloud environment configuration and remains unresolved.

Next Steps

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here to keep the discussion open.
  • Otherwise, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 20, 2025): Hi, @HugoChaan. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary** - You reported an "Internal Server Error" when using the Azure OpenAI Service model on Dify version 1.4.0 cloud service. - The same configuration works correctly on self-hosted deployments. - Another user confirmed the issue occurs on dify.ai but not on self-hosted instances. - Troubleshooting suggestions included checking timeouts, proxy settings, model provider versions, environment setup, API key encryption, and API container logs. - The problem seems specific to the cloud environment configuration and remains unresolved. **Next Steps** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here to keep the discussion open. - Otherwise, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#295