In version 1.1.3 of Dify, adding xAI shows a bad request. #131

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

Originally created by @Tingfing6 on GitHub (Mar 27, 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

x

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Tingfing6 on GitHub (Mar 27, 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 x ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce <img width="1513" alt="Image" src="https://github.com/user-attachments/assets/2681b77a-0bfb-4b61-8621-f5bd37cec8c8" /> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:18:10 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 27, 2025):

To resolve the "400 Bad Request" error when adding xAI in version 1.1.3 of Dify self-hosted with Docker, ensure that the URLs in your .env configuration file include the appropriate protocol (http:// or https://). If the URLs are listed without protocols, modify them to include either http:// or https:// as appropriate [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 (Mar 27, 2025): <!-- Answer --> To resolve the "400 Bad Request" error when adding xAI in version 1.1.3 of Dify self-hosted with Docker, ensure that the URLs in your `.env` configuration file include the appropriate protocol (http:// or https://). If the URLs are listed without protocols, modify them to include either http:// or https:// as appropriate <sup>[[1]](https://github.com/langgenius/dify/issues/16782)</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/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=other)</sup>
Author
Owner

@Tingfing6 commented on GitHub (Mar 27, 2025):

To resolve the "400 Bad Request" error when adding xAI in version 1.1.3 of Dify self-hosted with Docker, ensure that the URLs in your .env configuration file include the appropriate protocol (http:// or https://). If the URLs are listed without protocols, modify them to include either http:// or https:// as appropriate [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

@Tingfing6 commented on GitHub (Mar 27, 2025): > To resolve the "400 Bad Request" error when adding xAI in version 1.1.3 of Dify self-hosted with Docker, ensure that the URLs in your `.env` configuration file include the appropriate protocol (http:// or https://). If the URLs are listed without protocols, modify them to include either http:// or https:// as appropriate [[1]](https://github.com/langgenius/dify/issues/16782). > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu)._ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=other)
Author
Owner

@Tingfing6 commented on GitHub (Mar 27, 2025):

This is our .env file. Could you please tell me specifically what is wrong with it?
Image

@Tingfing6 commented on GitHub (Mar 27, 2025): This is our .env file. Could you please tell me specifically what is wrong with it? ![Image](https://github.com/user-attachments/assets/11271b6a-f34d-4577-aa9d-5c7fecba7847)
Author
Owner

@Tingfing6 commented on GitHub (Mar 27, 2025):

To resolve the "400 Bad Request" error when adding xAI in version 1.1.3 of Dify self-hosted with Docker, ensure that the URLs in your .env configuration file include the appropriate protocol (http:// or https://). If the URLs are listed without protocols, modify them to include either http:// or https:// as appropriate [1].要解决在使用 Docker 自托管的 Dify 版本 1.1.3 中添加 xAI 时出现的“400 错误请求”错误,请确保 .env 配置文件中的 URL 包含适当的协议(http:// 或 https://)。如果列出的 URL 没有协议,请根据需要修改它们以包括 http:// 或 https:// [1]。

To continue talking to Dosu, mention @dosu.要继续与 Dosu 交谈,请提及 。

Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other帮助 Dosu 学习!给它反馈:好评 |不相关的答案 |不正确的来源 |太冗长 |幻觉 |错误报告 | 其他

How exactly do I resolve this? I looked at the example you provided, and it still hasn’t been fixed.

@Tingfing6 commented on GitHub (Mar 27, 2025): > To resolve the "400 Bad Request" error when adding xAI in version 1.1.3 of Dify self-hosted with Docker, ensure that the URLs in your `.env` configuration file include the appropriate protocol (http:// or https://). If the URLs are listed without protocols, modify them to include either http:// or https:// as appropriate [[1]](https://github.com/langgenius/dify/issues/16782).要解决在使用 Docker 自托管的 Dify 版本 1.1.3 中添加 xAI 时出现的“400 错误请求”错误,请确保 `.env` 配置文件中的 URL 包含适当的协议(http:// 或 https://)。如果列出的 URL 没有协议,请根据需要修改它们以包括 http:// 或 https:// [[1]。](https://github.com/langgenius/dify/issues/16782) > > _To continue talking to [Dosu](https://dosu.dev), mention [@dosu](https://github.com/dosu).要继续与 [Dosu](https://dosu.dev) 交谈,请提及 。_ > > Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=other)帮助 Dosu 学习!给它反馈:[好评](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=great_response) |[不相关的答案](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=irrelevant_answer) |[不正确的来源](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=incorrect_sources) |[太冗长](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=too_verbose) |[幻觉](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=hallucination) |[错误报告](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=bug_report) | [其他](https://app.dosu.dev/response-feedback/07359778-88dc-407d-97e5-ebc078d907cc?feedback_type=other) How exactly do I resolve this? I looked at the example you provided, and it still hasn’t been fixed.
Author
Owner

@Tingfing6 commented on GitHub (Mar 27, 2025):

The reason is that Grok has restrictions. When directly calling the Grok model from the corresponding Dify container, the following error is reported: Blocked due to abusive traffic patterns

Image

@Tingfing6 commented on GitHub (Mar 27, 2025): The reason is that Grok has restrictions. When directly calling the Grok model from the corresponding Dify container, the following error is reported: Blocked due to abusive traffic patterns ![Image](https://github.com/user-attachments/assets/4fc14369-30ec-49a9-9b00-ba76d8085edb)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#131