Http Post Whisper #12539

Closed
opened 2026-02-21 19:07:53 -05:00 by yindo · 4 comments
Owner

Originally created by @LilyHuang-HZ on GitHub (Apr 3, 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.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I use API2D to OpenAI API

  1. In dify, it is normal when I use LLM such GPT-4. So this tells me that API2D is Ok in dify.
  2. I use curl to Whisper in terminal, and it is OK as follow:
(base) ➜  openai curl -X POST https://oa.api2d.net/v1/audio/translations -H "Authorization: Bearer fk231998-******" -H "Content-Type: multipart/form-data" -F "file=@output.mp3" -F "model=whisper-1"
{"text":"This security mistake could expose all your API keys in your key NAM workflows."}%
  1. I use the same base url and API-Key in python code, and it is ok.
  2. But I use http node in dify, it always appear misktake:

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @LilyHuang-HZ on GitHub (Apr 3, 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.0.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I use API2D to OpenAI API 1. In dify, it is normal when I use LLM such GPT-4. So this tells me that API2D is Ok in dify. 2. I use curl to Whisper in terminal, and it is OK as follow: ``` (base) ➜ openai curl -X POST https://oa.api2d.net/v1/audio/translations -H "Authorization: Bearer fk231998-******" -H "Content-Type: multipart/form-data" -F "file=@output.mp3" -F "model=whisper-1" {"text":"This security mistake could expose all your API keys in your key NAM workflows."}% ``` 3. I use the same base url and API-Key in python code, and it is ok. 4. But I use http node in dify, it always appear misktake: ![Image](https://github.com/user-attachments/assets/da4bef72-434b-472b-adfa-54d506474cef) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:07:53 -05:00
yindo closed this issue 2026-02-21 19:07:53 -05:00
Author
Owner

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

你好 @LilyHuang-HZ!我是一个可以帮助你解决bug、回答问题并成为贡献者的机器人。在你等待人类维护者的过程中,我会尽力帮助你!

I found a similar closed issue that might be relevant to your problem. The issue suggested checking the following to address the "Reached maximum retries" error:

  • Ensure that the server you're trying to reach is not experiencing issues or rate limiting.
  • Verify that the request parameters and headers are correctly set in the HTTP node.
  • Consider increasing the timeout settings or adjusting the retry logic if possible.

If the issue persists, reviewing the server logs or network conditions might provide additional insights [1].

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 (Apr 3, 2025): <!-- Greeting --> 你好 @LilyHuang-HZ!我是一个可以帮助你解决bug、回答问题并成为贡献者的机器人。在你等待人类维护者的过程中,我会尽力帮助你! <!-- Answer --> I found a similar closed issue that might be relevant to your problem. The issue suggested checking the following to address the "Reached maximum retries" error: - Ensure that the server you're trying to reach is not experiencing issues or rate limiting. - Verify that the request parameters and headers are correctly set in the HTTP node. - Consider increasing the timeout settings or adjusting the retry logic if possible. If the issue persists, reviewing the server logs or network conditions might provide additional insights <sup>[[1]](https://github.com/langgenius/dify/issues/11371)</sup>. <!-- 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/50b20a69-ea2c-48a4-b5c7-bce18c6510fa?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/50b20a69-ea2c-48a4-b5c7-bce18c6510fa?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/50b20a69-ea2c-48a4-b5c7-bce18c6510fa?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/50b20a69-ea2c-48a4-b5c7-bce18c6510fa?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/50b20a69-ea2c-48a4-b5c7-bce18c6510fa?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/50b20a69-ea2c-48a4-b5c7-bce18c6510fa?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/50b20a69-ea2c-48a4-b5c7-bce18c6510fa?feedback_type=other)</sup>
Author
Owner

@LilyHuang-HZ commented on GitHub (Apr 3, 2025):

There is maybe a mistake in the picture in my question,I change the model as whisper -1 in body parameters of http node. still the same prombelm.

@LilyHuang-HZ commented on GitHub (Apr 3, 2025): There is maybe a mistake in the picture in my question,I change the model as whisper -1 in body parameters of http node. still the same prombelm.
Author
Owner

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

You need to allow domain in squid conf.

@crazywoola commented on GitHub (Apr 3, 2025): You need to allow domain in squid conf.
Author
Owner

@LilyHuang-HZ commented on GitHub (Apr 4, 2025):

You need to allow domain in squid conf.

Thanks a lot!

  1. With the help of chatGPT and dify docs I add something in the file./dify/docker/ssrf_proxy/squid_squid.conf.template:
   # 允许访问API2D的所有服务,包括音频API
   acl api2d_domains dstdomain .api2d.net
   acl api2d_audio_url url_regex -i ^https://oa\.api2d\.net/v1/audio/.*
   
   # 确保这些规则优先于其他限制性规则
   http_access allow api2d_domains
   http_access allow api2d_audio_url
  1. I rundocker exec -it docker-ssrf_proxy-1 bash, and testing curl to post whisper through API2D in the container docker-ssrf_proxy-1, and it is normal. No matter whatever I add aboved or not, whisper can be posted by API2D in docker-ssrf_proxy-1.
  2. In dify, I can use GPT-4 model using LLM node through API2D , but using http node to post whiser, always have mistakes.
    @crazywoola
@LilyHuang-HZ commented on GitHub (Apr 4, 2025): > You need to allow domain in squid conf. Thanks a lot! 1. With the help of chatGPT and dify [docs](https://docs.dify.ai/zh-hans/learn-more/faq/install-faq#ru-he-zi-ding-yi-dai-li-de-xing-wei) I add something in the file`./dify/docker/ssrf_proxy/squid_squid.conf.template`: ``` # 允许访问API2D的所有服务,包括音频API acl api2d_domains dstdomain .api2d.net acl api2d_audio_url url_regex -i ^https://oa\.api2d\.net/v1/audio/.* # 确保这些规则优先于其他限制性规则 http_access allow api2d_domains http_access allow api2d_audio_url ``` 2. I run`docker exec -it docker-ssrf_proxy-1 bash`, and testing curl to post whisper through API2D in the container docker-ssrf_proxy-1, and it is normal. No matter whatever I add aboved or not, whisper can be posted by API2D in docker-ssrf_proxy-1. 3. In dify, I can use GPT-4 model using LLM node through API2D , but using http node to post whiser, always have mistakes. @crazywoola
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12539