OpenAI plugin request timeout when setting API-KEY #561

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

Originally created by @icejean on GitHub (Aug 14, 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.7.2

Plugin version

openai-0.2.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I 'v setup proxy environment in my local docker installation of the latest Dify 1.7.2, and can access OpenAI in the containers:

(base) root@10-60-136-78:~# docker exec  -it docker-ssrf_proxy-1 /bin/sh
# curl -x http://ssrf_proxy:3128 https://api.openai.com
{
    "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference"
}

(base) root@10-60-136-78:~# docker exec  -it docker-api-1 /bin/sh
# curl https://api.openai.com
{
    "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference"
}

(base) root@10-60-136-78:~# docker exec  -it docker-plugin_daemon-1 /bin/sh
# curl https://api.openai.com
{
    "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference"
}

(base) root@10-60-136-78:~# docker exec  -it docker-sandbox-1 /bin/sh
# curl https://api.openai.com
{
    "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference"
}

But when I install OpenAI plugin from model supplier and try to set the API-KEY, it always runs to an "Request timeout" error message in a few seconds less than 15. I think there may be a bug somewhere other than the setting of proxy, because I can access OpenAI through the OpenAI-API-compatible plugin.
I'v read issue#22100, issue#20336 and issue#4186, and verify that changing the setting in .env of PLUGIN_MAX_EXECUTION_TIMEOUT takes no effect, 15 seconds is much more less than the default value 600 seconds.

PLUGIN_MAX_EXECUTION_TIMEOUT=600

So there must be something wrong in somewhere else.

✔️ Error log

Here's the log of the setting API-KEY operation:

plugin_daemon-1  | [GIN] 2025/08/14 - 08:32:47 | 200 |   28.587494ms |     172.22.0.10 | GET      "/plugin/cce1e4d2-9bea-4d80-92d2-3e4fbe4c010b/management/models?page=1&page_size=256"
ssrf_proxy-1     | 2025/08/14 08:32:48 pinger| SendEcho ERROR: sending to ICMPv6 packet to [2a03:2880:f126:83:face:b00c:0:25de]: (101) Network is unreachable
ssrf_proxy-1     | 1755160369.565      0 172.22.0.9 NONE_NONE/000 0 - error:transaction-end-before-headers - HIER_NONE/- -
nginx-1          | 223.104.85.138 - - [14/Aug/2025:08:32:50 +0000] "POST /console/api/apps/db460def-ba13-4407-a925-e990aabcadd9/workflows/draft?_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiODZjNWMwOGMtZmFmNC00MTIzLWIwNDQtNTVhY2Q4ZTdjM2YzIiwiZXhwIjoxNzU1MTYwNjI1LCJpc3MiOiJTRUxGX0hPU1RFRCIsInN1YiI6IkNvbnNvbGUgQVBJIFBhc3Nwb3J0In0.sq-4Yz5mLXZn_N145AK3Y43qt25VG9lVV4N3Bub-cPA HTTP/1.1" 200 124 "http://117.50.174.65:6060/app/db460def-ba13-4407-a925-e990aabcadd9/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0" "-"
ssrf_proxy-1     | 1755160373.299   5002 172.22.0.9 TCP_TUNNEL/200 39 CONNECT api.openai.com:443 - FIRSTUP_PARENT/172.17.0.1 -
ssrf_proxy-1     | 1755160378.711   5002 172.22.0.9 TCP_TUNNEL/200 39 CONNECT api.openai.com:443 - FIRSTUP_PARENT/172.17.0.1 -
plugin_daemon-1  | [GIN] 2025/08/14 - 08:32:58 | 200 | 10.868461488s |     172.22.0.10 | POST     "/plugin/cce1e4d2-9bea-4d80-92d2-3e4fbe4c010b/dispatch/model/validate_provider_credentials"
api-1            | 2025-08-14 08:32:58.715 ERROR [Dummy-1] [base.py:211] - Error in stream reponse for plugin {'code': -500, 'message': '{"message":"{\\"args\\":{},\\"error_type\\":\\"CredentialsValidateFailedError\\",\\"message\\":\\"Request timed out.\\"}","error_type":"PluginInvokeError","args":null}', 'data': None}
nginx-1          | 223.104.85.138 - - [14/Aug/2025:08:32:58 +0000] "POST /console/api/workspaces/current/model-providers/langgenius/openai/openai HTTP/1.1" 400 74 "http://117.50.174.65:6060/app/db460def-ba13-4407-a925-e990aabcadd9/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0" "-"

The ssrf_proxy service log 'FIRSTUP_PARENT' indicates that ssrf_proxy did transform the request to upper proxy correctly, but the time out message of api service followed soon, in less than 15 seconds.

Originally created by @icejean on GitHub (Aug 14, 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.7.2 ### Plugin version openai-0.2.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I 'v setup proxy environment in my local docker installation of the latest Dify 1.7.2, and can access OpenAI in the containers: ``` (base) root@10-60-136-78:~# docker exec -it docker-ssrf_proxy-1 /bin/sh # curl -x http://ssrf_proxy:3128 https://api.openai.com { "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference" } (base) root@10-60-136-78:~# docker exec -it docker-api-1 /bin/sh # curl https://api.openai.com { "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference" } (base) root@10-60-136-78:~# docker exec -it docker-plugin_daemon-1 /bin/sh # curl https://api.openai.com { "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference" } (base) root@10-60-136-78:~# docker exec -it docker-sandbox-1 /bin/sh # curl https://api.openai.com { "message": "Welcome to the OpenAI API! Documentation is available at https://platform.openai.com/docs/api-reference" } ``` But when I install OpenAI plugin from model supplier and try to set the API-KEY, it always runs to an "Request timeout" error message in a few seconds less than 15. I think there may be a bug somewhere other than the setting of proxy, because I can access OpenAI through the OpenAI-API-compatible plugin. I'v read [issue#22100](https://github.com/langgenius/dify/issues/22100), [issue#20336](https://github.com/langgenius/dify/issues/20336) and [issue#4186](https://github.com/langgenius/dify/issues/4186), and verify that changing the setting in .env of PLUGIN_MAX_EXECUTION_TIMEOUT takes no effect, 15 seconds is much more less than the default value 600 seconds. ``` PLUGIN_MAX_EXECUTION_TIMEOUT=600 ``` So there must be something wrong in somewhere else. ### ✔️ Error log Here's the log of the setting API-KEY operation: ``` plugin_daemon-1 | [GIN] 2025/08/14 - 08:32:47 | 200 | 28.587494ms | 172.22.0.10 | GET "/plugin/cce1e4d2-9bea-4d80-92d2-3e4fbe4c010b/management/models?page=1&page_size=256" ssrf_proxy-1 | 2025/08/14 08:32:48 pinger| SendEcho ERROR: sending to ICMPv6 packet to [2a03:2880:f126:83:face:b00c:0:25de]: (101) Network is unreachable ssrf_proxy-1 | 1755160369.565 0 172.22.0.9 NONE_NONE/000 0 - error:transaction-end-before-headers - HIER_NONE/- - nginx-1 | 223.104.85.138 - - [14/Aug/2025:08:32:50 +0000] "POST /console/api/apps/db460def-ba13-4407-a925-e990aabcadd9/workflows/draft?_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiODZjNWMwOGMtZmFmNC00MTIzLWIwNDQtNTVhY2Q4ZTdjM2YzIiwiZXhwIjoxNzU1MTYwNjI1LCJpc3MiOiJTRUxGX0hPU1RFRCIsInN1YiI6IkNvbnNvbGUgQVBJIFBhc3Nwb3J0In0.sq-4Yz5mLXZn_N145AK3Y43qt25VG9lVV4N3Bub-cPA HTTP/1.1" 200 124 "http://117.50.174.65:6060/app/db460def-ba13-4407-a925-e990aabcadd9/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0" "-" ssrf_proxy-1 | 1755160373.299 5002 172.22.0.9 TCP_TUNNEL/200 39 CONNECT api.openai.com:443 - FIRSTUP_PARENT/172.17.0.1 - ssrf_proxy-1 | 1755160378.711 5002 172.22.0.9 TCP_TUNNEL/200 39 CONNECT api.openai.com:443 - FIRSTUP_PARENT/172.17.0.1 - plugin_daemon-1 | [GIN] 2025/08/14 - 08:32:58 | 200 | 10.868461488s | 172.22.0.10 | POST "/plugin/cce1e4d2-9bea-4d80-92d2-3e4fbe4c010b/dispatch/model/validate_provider_credentials" api-1 | 2025-08-14 08:32:58.715 ERROR [Dummy-1] [base.py:211] - Error in stream reponse for plugin {'code': -500, 'message': '{"message":"{\\"args\\":{},\\"error_type\\":\\"CredentialsValidateFailedError\\",\\"message\\":\\"Request timed out.\\"}","error_type":"PluginInvokeError","args":null}', 'data': None} nginx-1 | 223.104.85.138 - - [14/Aug/2025:08:32:58 +0000] "POST /console/api/workspaces/current/model-providers/langgenius/openai/openai HTTP/1.1" 400 74 "http://117.50.174.65:6060/app/db460def-ba13-4407-a925-e990aabcadd9/workflow" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0" "-" ``` The ssrf_proxy service log 'FIRSTUP_PARENT' indicates that ssrf_proxy did transform the request to upper proxy correctly, but the time out message of api service followed soon, in less than 15 seconds.
yindo added the bug label 2026-02-16 10:19:44 -05:00
yindo closed this issue 2026-02-16 10:19:44 -05:00
Author
Owner

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

Hi, @icejean. 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 a timeout issue with the OpenAI plugin (v0.2.3) in a self-hosted Dify 1.7.2 Docker environment.
  • The problem occurs when setting the API key, despite confirmed proxy settings.
  • API access via curl inside the containers works fine, but plugin requests still time out.
  • No further updates or responses have been provided since the initial report.

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.
  • If I don’t hear back from you within 5 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 30, 2025): Hi, @icejean. 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 a timeout issue with the OpenAI plugin (v0.2.3) in a self-hosted Dify 1.7.2 Docker environment. - The problem occurs when setting the API key, despite confirmed proxy settings. - API access via curl inside the containers works fine, but plugin requests still time out. - No further updates or responses have been provided since the initial report. **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. - If I don’t hear back from you within 5 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@icejean commented on GitHub (Aug 30, 2025):

It's O.K. with the latest version 1.8.0, thanks for your information.

Image
@icejean commented on GitHub (Aug 30, 2025): It's O.K. with the latest version 1.8.0, thanks for your information. <img width="1920" height="1030" alt="Image" src="https://github.com/user-attachments/assets/d2e5e548-2b1d-4980-b61a-a8429146e798" />
Author
Owner

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

Thank you for the update and confirmation that the issue is resolved in version 1.8.0. We appreciate you letting us know. We'll go ahead and close this issue now.

@dosubot[bot] commented on GitHub (Aug 30, 2025): Thank you for the update and confirmation that the issue is resolved in version 1.8.0. We appreciate you letting us know. We'll go ahead and close this issue now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#561