SearXNG Add URL prompt 400 code error #12774

Closed
opened 2026-02-21 19:08:59 -05:00 by yindo · 6 comments
Owner

Originally created by @SS8-001 on GitHub (Apr 10, 2025).

Originally assigned to: @crazywoola on GitHub.

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

v1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

SearXNG 0.0.3 Add URL prompt 400 code error

PluginInvokeError: {"args":{},"error_type":"ToolProviderCredentialValidationError","message":"Error 400: {"error": "Invalid value \"all\" for parameter time_range"}"}

Image

The settings.yml configuration file has been added

formats:
- json
- html

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @SS8-001 on GitHub (Apr 10, 2025). Originally assigned to: @crazywoola on GitHub. ### 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 v1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce SearXNG 0.0.3 Add URL prompt 400 code error PluginInvokeError: {"args":{},"error_type":"ToolProviderCredentialValidationError","message":"Error 400: {\"error\": \"Invalid value \\\"all\\\" for parameter time_range\"}"} ![Image](https://github.com/user-attachments/assets/8f35143b-dfc9-4ab3-ad95-3bdf6133eb58) The settings.yml configuration file has been added formats: - json - html ![Image](https://github.com/user-attachments/assets/1839ba9c-a3a9-41ba-8699-add5bd76e6c4) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:08:59 -05:00
Author
Owner

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

Hello @SS8-001! I'm Dosu, a bot here to help you with bugs, answer questions, and support you as you contribute. I'm ready to assist while you wait for a human maintainer. How can I help you today?

The error you're encountering, "Invalid value 'all' for parameter time_range," suggests that the value 'all' is not a valid option for the time_range parameter in the SearXNG configuration. This is causing the ToolProviderCredentialValidationError with a 400 status code.

To resolve this issue, you should check the valid values for the time_range parameter in the SearXNG documentation or configuration guidelines. Unfortunately, I couldn't find specific details about the valid values for time_range in the available resources. However, common values for such parameters often include specific time frames like 'day', 'week', 'month', etc.

Ensure that the time_range parameter in your configuration file is set to one of the valid values. If you're unsure about the correct values, consulting the SearXNG documentation or community might provide the necessary guidance. Additionally, double-check the configuration file for any syntax errors or misconfigurations that might be contributing to the issue.

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 10, 2025): <!-- Greeting --> Hello @SS8-001! I'm [Dosu](https://dosu.dev), a bot here to help you with bugs, answer questions, and support you as you contribute. I'm ready to assist while you wait for a human maintainer. How can I help you today? <!-- Answer --> The error you're encountering, "Invalid value 'all' for parameter time_range," suggests that the value 'all' is not a valid option for the `time_range` parameter in the SearXNG configuration. This is causing the `ToolProviderCredentialValidationError` with a 400 status code. To resolve this issue, you should check the valid values for the `time_range` parameter in the SearXNG documentation or configuration guidelines. Unfortunately, I couldn't find specific details about the valid values for `time_range` in the available resources. However, common values for such parameters often include specific time frames like 'day', 'week', 'month', etc. Ensure that the `time_range` parameter in your configuration file is set to one of the valid values. If you're unsure about the correct values, consulting the SearXNG documentation or community might provide the necessary guidance. Additionally, double-check the configuration file for any syntax errors or misconfigurations that might be contributing to the issue. <!-- 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/8c3dced4-2ce1-4ea1-b3c6-08650717237a?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/8c3dced4-2ce1-4ea1-b3c6-08650717237a?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/8c3dced4-2ce1-4ea1-b3c6-08650717237a?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/8c3dced4-2ce1-4ea1-b3c6-08650717237a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8c3dced4-2ce1-4ea1-b3c6-08650717237a?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/8c3dced4-2ce1-4ea1-b3c6-08650717237a?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8c3dced4-2ce1-4ea1-b3c6-08650717237a?feedback_type=other)</sup>
Author
Owner

@liguochuan00 commented on GitHub (Apr 10, 2025):

Downgrading to the 0.0.2 plug-in version will not report this error, but will report an error in the agent, please fix this problem

@liguochuan00 commented on GitHub (Apr 10, 2025): Downgrading to the 0.0.2 plug-in version will not report this error, but will report an error in the agent, please fix this problem
Author
Owner

@SS8-001 commented on GitHub (Apr 10, 2025):

Downgrading to the 0.0.2 plug-in version will not report this error, but will report an error in the agent, please fix this problem

With SearXNG version 0.0.2, the call will report an error

Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for SessionMessage\ndata\n Input should be a valid dictionary [type=dict_type, input_value=('type', \u003cMessageType.TEXT: 'text'\u003e), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.8/v/dict_type"}
@dosu

@SS8-001 commented on GitHub (Apr 10, 2025): > Downgrading to the 0.0.2 plug-in version will not report this error, but will report an error in the agent, please fix this problem With SearXNG version 0.0.2, the call will report an error Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for SessionMessage\ndata\n Input should be a valid dictionary [type=dict_type, input_value=('type', \u003cMessageType.TEXT: 'text'\u003e), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.8/v/dict_type"} @dosu
Author
Owner

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

The error you're encountering with SearXNG version 0.0.2, "ValidationError: Input should be a valid dictionary," suggests that the SessionMessage data is not being recognized as a valid dictionary. This is a common issue related to cookie handling in HTTP requests to SearXNG. To resolve this, ensure that your input data is correctly formatted as a dictionary and that all necessary cookie values are correctly configured.

For the issue with version 0.0.3, the "Invalid value 'all' for parameter time_range" error indicates that 'all' is not a valid value for the time_range parameter. You might need to use specific time frames like 'day', 'week', or 'month' instead.

If downgrading to version 0.0.2 resolves the time_range issue but introduces the SessionMessage error, you may need to adjust your configuration or data handling to align with the requirements of each version. Unfortunately, I couldn't find specific details about the valid values for time_range or the expected format for SessionMessage in the available resources.

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 10, 2025): <!-- Answer --> The error you're encountering with SearXNG version 0.0.2, "ValidationError: Input should be a valid dictionary," suggests that the `SessionMessage` data is not being recognized as a valid dictionary. This is a common issue related to cookie handling in HTTP requests to SearXNG. To resolve this, ensure that your input data is correctly formatted as a dictionary and that all necessary cookie values are correctly configured. For the issue with version 0.0.3, the "Invalid value 'all' for parameter time_range" error indicates that 'all' is not a valid value for the `time_range` parameter. You might need to use specific time frames like 'day', 'week', or 'month' instead. If downgrading to version 0.0.2 resolves the `time_range` issue but introduces the `SessionMessage` error, you may need to adjust your configuration or data handling to align with the requirements of each version. Unfortunately, I couldn't find specific details about the valid values for `time_range` or the expected format for `SessionMessage` in the available resources. <!-- 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/5cd45889-15b1-48d1-a0c7-8ff1aea1ff68?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/5cd45889-15b1-48d1-a0c7-8ff1aea1ff68?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/5cd45889-15b1-48d1-a0c7-8ff1aea1ff68?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/5cd45889-15b1-48d1-a0c7-8ff1aea1ff68?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5cd45889-15b1-48d1-a0c7-8ff1aea1ff68?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/5cd45889-15b1-48d1-a0c7-8ff1aea1ff68?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5cd45889-15b1-48d1-a0c7-8ff1aea1ff68?feedback_type=other)</sup>
Author
Owner

@liguochuan00 commented on GitHub (Apr 10, 2025):

Great, very efficient

@liguochuan00 commented on GitHub (Apr 10, 2025): Great, very efficient
Author
Owner

@liguochuan00 commented on GitHub (Apr 11, 2025):

When using agent to ask questions, the tool will still report an error:
{"searxng_search": "tool invoke error: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for SessionMessage\ndata\n Input should be a valid dictionary [type=dict_type, input_value=('type', \u003cMessageType.TEXT: 'text'\u003e), input_type=tuple]\n For further information visit https://errors.pydantic.dev/2.11/v/dict_type"}"}

@dosu

@liguochuan00 commented on GitHub (Apr 11, 2025): When using agent to ask questions, the tool will still report an error: {"searxng_search": "tool invoke error: PluginInvokeError: {\"args\":{},\"error_type\":\"ValidationError\",\"message\":\"1 validation error for SessionMessage\\ndata\\n Input should be a valid dictionary [type=dict_type, input_value=('type', \\u003cMessageType.TEXT: 'text'\\u003e), input_type=tuple]\\n For further information visit https://errors.pydantic.dev/2.11/v/dict_type\"}"} @dosu
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12774