mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
Unable to connect LlamaCloud as External Knowledge API in Dify #845
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 @luisfynn on GitHub (Dec 2, 2025).
Originally assigned to: @hjlarry on GitHub.
Self Checks
Dify version
1.10.1
Cloud or Self Hosted
Cloud
Steps to reproduce
Steps to reproduce the behavior:
✔️ Expected Behavior
LlamaCloud should connect successfully as an external knowledge source and be available for use in the knowledge base.
❌ Actual Behavior
Connection fails with error message:
failed to connect to the endpoint@dosubot[bot] commented on GitHub (Dec 2, 2025):
Hi @luisfynn! I'm Dosu and I’m helping the dify team.
The most common cause of the "failed to connect to the endpoint" error when integrating LlamaCloud as an External Knowledge API in Dify is an incorrectly formatted endpoint URL. When configuring the endpoint in Dify, you must paste the Endpoint URL from LlamaCloud but remove the
/retrievalsuffix—Dify automatically appends/retrievalwhen making requests. For the API Key, since LlamaCloud does not enforce authorization, you can enter any value, but you must keep the endpoint URL secret. After connecting, enter your Pipeline ID in the "Knowledge ID" field to complete the setup and enable retrieval testing. See the official plugin instructions for details and screenshots: LlamaCloud plugin README.If you still see the error after correcting the endpoint, double-check for typos, ensure the endpoint starts with
http://orhttps://, and verify there are no network/firewall issues blocking the connection. The Dify backend will raise this error for any network or configuration problem, including invalid URLs or missing required fields in the setup. Recent updates have added robust validation and error handling for these cases, so following the exact setup steps should resolve the issue.To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@dosubot[bot] commented on GitHub (Dec 2, 2025):
The "failed to connect to the endpoint" error when adding LlamaCloud as an External Knowledge API in Dify can be caused by several factors:
/retrievalto the endpoint and sends a POST request with your API key in the Authorization header. If the endpoint is unreachable, misconfigured, or the API key is invalid, you'll see this error. See implementation detailsTroubleshooting checklist:
Recent updates have improved error handling and validation for external knowledge APIs, but the plugin itself does not provide granular error feedback. If the above steps don't resolve the issue, gathering endpoint and API key details, along with any error logs, will help further diagnose the problem.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@luisfynn commented on GitHub (Dec 2, 2025):
@dosu
I tried to upload an image but it's not working. I've attached a screenshot/image for reference - please let me know if you can see it.
@dosubot[bot] commented on GitHub (Dec 2, 2025):
I can't view the actual screenshots you uploaded, but I do receive the image descriptions you provided. Based on those, I can confirm that I see details about your API key setup, the endpoint configuration modal, and the error message when trying to connect LlamaCloud as an external knowledge API. If there are any specific technical details or error messages visible in the screenshots that aren't included in the descriptions, please share them in text form so I can help troubleshoot further. Let me know if you want to clarify anything from the image descriptions or need more help!
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@luisfynn commented on GitHub (Dec 2, 2025):
@dosu
I generated an API key in LlamaCloud, then installed the LlamaCloud plugin in Dify (Plugins → Extensions → LlamaCloud). In the endpoint settings, I entered "llamacloud" for the endpoint name and pasted the API key generated from LlamaCloud. When I clicked save, it showed "Service is normal" at the bottom.
After that, I went to Knowledge → External Knowledge → Add External Knowledge API. I entered "llama_cloud" for the name, and for the API endpoint, I copied the POST address that appeared after configuring the endpoint in Dify, then removed the "/retrieval" part. For the API key field, I tried both the actual LlamaCloud API key and random strings (10+ characters), but none of them work - the connection always fails.
Steps I followed:
What could be causing this connection issue?
@dosubot[bot] commented on GitHub (Dec 2, 2025):
The connection issue is likely caused by how Dify expects the endpoint URL for external knowledge APIs. When you add the LlamaCloud endpoint in Dify's External Knowledge API settings, you should copy the endpoint URL from the plugin settings and remove the
/retrievalpart—this is correct, as Dify will automatically append/retrievalwhen making requests. For the API key, you can enter any string; the plugin does not validate this field, but the endpoint URL must remain secret to prevent unauthorized access.If you are still seeing "failed to connect to the endpoint," double-check that the endpoint URL you enter starts with
http://orhttps://and is accessible from Dify Cloud. Also, make sure there are no network restrictions or typos in the URL. If the issue persists, there may be a network or deployment issue preventing Dify from reaching the plugin endpoint.Reference: LlamaCloud plugin README, Dify endpoint validation logic.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@luisfynn commented on GitHub (Dec 2, 2025):
@dosu This is really frustrating. I've tried everything but it still doesn't work.
I'm confused about what exactly should be entered in the "API Endpoint" field when adding an External Knowledge API in Dify.
Could you clarify:
I've been testing both ways and neither works. This is really frustrating and the error messages aren't helpful at all.
Can you provide a concrete example of what a correct API Endpoint URL should look like?
Could you please escalate this to the engineering team or ask a developer who actually worked on this feature? I need proper guidance from someone who knows the implementation details.
@dosubot[bot] commented on GitHub (Dec 2, 2025):
I know this is frustrating, but here’s the concrete answer based on the implementation and official plugin docs:
You should use the endpoint URL from Dify’s plugin configuration (the one you see after creating the endpoint in the LlamaCloud plugin settings), but you must remove the /retrieval part before pasting it into the “API Endpoint” field. Do not use the LlamaCloud dashboard’s pipeline API URL—Dify expects to talk to the plugin endpoint, not directly to LlamaCloud’s API.
For example, if Dify’s plugin gives you:
You should enter this in the “API Endpoint” field:
Dify will automatically append /retrieval when making requests. For the API Key, you can enter any string (the plugin doesn’t validate it, but keep the endpoint URL secret) — see the plugin README and backend logic.
If you still get “failed to connect to the endpoint,” double-check for typos, make sure the URL starts with http:// or https://, and confirm the endpoint is accessible from Dify Cloud (not localhost or a private address). If you’re self-hosting, test with curl or Postman to ensure the endpoint responds at /retrieval.
If you’ve followed these steps and it still fails, there may be a network or deployment issue. At that point, collecting logs and endpoint details will help the engineering team dig deeper.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@luisfynn commented on GitHub (Dec 2, 2025):
@dosu Update: LlamaCloud doesn't have permission settings for API keys - they automatically have full access when created.
So the issue is NOT about API key permissions. There must be something else wrong with the integration.
Can the engineering team look into this? This seems like a bug or compatibility issue between Dify and LlamaCloud.
@dosubot[bot] commented on GitHub (Dec 2, 2025):
You're right—API key permissions are not the cause here. Based on the code and recent reports, this looks like a compatibility issue between Dify and the LlamaCloud plugin. The main problem is that Dify's endpoint validation sends a POST to your plugin endpoint with only an Authorization header and no JSON payload, but the LlamaCloud plugin expects a full JSON body. This mismatch causes the plugin to error out internally, which Dify then reports as "failed to connect to the endpoint" (plugin code, Dify validation logic).
There’s also a bug in the plugin’s retrieval settings handling that could cause runtime errors, making things worse.
For engineering to investigate, it would help to have:
If you’re able to self-host or modify the plugin, a quick workaround is to update the plugin’s
/retrievalendpoint to handle empty or malformed POSTs gracefully (returning a 400 with a clear message instead of a 500). This would let Dify’s health check succeed and make debugging easier.Let me know if you want help formatting this info for the engineering team or if you need guidance on capturing logs or testing the endpoint.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
@luisfynn commented on GitHub (Dec 2, 2025):
@dosu
So basically, both internal knowledge (due to the chunking/overlap bug) and external knowledge (due to the LlamaCloud plugin compatibility issue) are broken right now?
When do you think these issues will be fixed? Any estimated timeline?
This is really frustrating because I can't use any knowledge base features at all.
@dosubot[bot] commented on GitHub (Dec 2, 2025):
Right now, both internal knowledge (due to the chunking/overlap bug) and external knowledge (due to the LlamaCloud plugin compatibility issue) are not working reliably in Dify Cloud. The chunking bug—where documents get stuck in the "Queuing" state or chunk settings fail—has been fixed in newer code, but the fix hasn't been deployed to the cloud yet, and there’s no official ETA for when it will be live. There are no documented workarounds for cloud users except waiting for a platform update; reverting to older versions only helps for self-hosted setups [source].
For the LlamaCloud plugin, the main issue is a mismatch between how Dify validates endpoints and how the plugin expects requests. This causes persistent connection failures, especially in cloud deployments, and there’s no timeline or recent code changes addressing this compatibility problem [source]. The only actionable steps are to double-check endpoint formatting, ensure public accessibility, and re-add the API if the endpoint changes, but these don’t resolve the underlying bug.
I know this is frustrating—there’s no official ETA for fixes on either front. The best way to track progress is to monitor GitHub issues and release notes for updates. If you want to dig deeper or share logs, I can help format info for engineering or guide you through troubleshooting steps.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other