mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
PluginInvokeError: 400 Bad Request from Perplexity Plugin in Dify #146
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @svnshikhil on GitHub (Mar 28, 2025).
Self Checks
Dify version
1.1.3
Cloud or Self Hosted
Cloud
Steps to reproduce
Install the Perplexity plugin from the Dify Plugin Marketplace.
Attempt to invoke it through a workflow or tool call.
Observe the error response.
✔️ Expected Behavior
The plugin should return a valid response from the Perplexity API, or at least provide a clearer error message indicating what is wrong with the request.
❌ Actual Behavior
Instead of returning a response, the plugin throws the following error:
Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"HTTPError","message":"400 Client Error: Bad Request for url: https://api.perplexity.ai/chat/completions"}Environment:
@dosubot[bot] commented on GitHub (Mar 28, 2025):
Hello @svnshikhil! I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's tackle this issue together!
A 400 Bad Request error in the Dify platform when using the Perplexity plugin can be caused by several factors. Here are some common causes and potential solutions:
Incorrect Input Format: Ensure that the input to the Perplexity plugin is correctly formatted. The expected input is a JSON object with
knowledge_id(string),query(string), andretrieval_setting(object) containingtop_k(int) andscore_threshold(float). Ifmetadata_conditionis used, it should be an object with aconditionsarray [1].Special Characters in Request: If the request body contains special characters like newlines, ensure that the body format is set to 'JSON' instead of 'raw' in the HTTP request configuration to avoid formatting issues [2].
API Endpoint Issues: Verify that the correct API endpoint is being used. The error message indicates a problem with the URL, so double-check the endpoint URL for any typos or incorrect paths [3].
Network Restrictions: Ensure that there are no network restrictions preventing access to the Perplexity API. This can include firewall settings or lack of internet access [2].
Plugin Version Compatibility: Make sure that the plugin version is compatible with the Dify platform version you are using. Recent updates to the platform might affect plugin functionality [4].
If these steps do not resolve the issue, consider using Dify's remote debugging feature to gain more detailed insights into the error [5].
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
@lleites commented on GitHub (Mar 28, 2025):
I have the same issue, just started with the platform today, no sure if it is relevant but maybe it is an issue for newbies only.
@lleites commented on GitHub (Mar 28, 2025):
I tried the code of the client used in the plugin, only with the token +
tool_parameters= {"query": "What is the capital of France?"}and it works well, so it is not changes on the API or else.Probably there is a regression in the new Dify version.
@WolfricWang commented on GitHub (Mar 30, 2025):
Same issue for me, finally find out why this happen. Wish the pull request approved soon.
@svnshikhil commented on GitHub (Apr 1, 2025):
Fixed - https://github.com/langgenius/dify-official-plugins/pull/606
@k-symmons commented on GitHub (Apr 2, 2025):
Same issue still occurring to me (0.04)