mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
Hugging Face Hub: invalid user #716
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 @hiiamboris on GitHub (Oct 14, 2025).
Self Checks
Dify version
1.9.0
Plugin version
0.0.5
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
(sure, all parameters were entered correctly, according to the plugin docs)
✔️ Error log
@dosubot[bot] commented on GitHub (Oct 14, 2025):
The plugin validates the Hugging Face "User Name / Organization Name" (the
huggingface_namespacefield) by making a direct API request to Hugging Face's endpoints using your provided API token. If the namespace is not recognized or accessible, it returns the "User Name or Organization Name is invalid" error. The expected value for this field is either your Hugging Face account username or your organization name, exactly as shown in your Hugging Face account settings or the Inference Endpoints UI. Double-check for typos, extra spaces, or mismatches with your Hugging Face dashboard. Also, make sure your API token has the necessary permissions and that the endpoint URL matches the one shown in your Hugging Face deployment console. More details and screenshots are in the plugin's README and YAML config.If everything looks correct and you still get the error, it could be a bug or a change in Hugging Face's API. In that case, try regenerating your API token, confirm your endpoint is active, and ensure your namespace is accessible via the Hugging Face API.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@hiiamboris commented on GitHub (Oct 14, 2025):
I'm not dumb, I can spell
hiiamborisjust fine. And I tried a token with unlimited write permissions - to the same end. All tokens are fresh. Endpoint was active and even running. My own API calls work fine, no errors.@dosubot[bot] commented on GitHub (Oct 14, 2025):
You've clearly ruled out typos, token permissions, and endpoint status, and your direct API calls work—so this looks like a plugin-side bug or a mismatch in how Dify constructs or validates the Hugging Face request. The plugin expects the "User Name / Organization Name" field to match exactly what's shown in your Hugging Face account or org settings, but the actual credential validation logic in the plugin is either missing or handled elsewhere, which could mean it's enforcing stricter checks or misinterpreting the API response compared to your direct calls (plugin code, README). There are no recent fixes or open issues about this, so it's likely an edge case or a bug in the plugin's validation flow.
If you want to dig deeper, you could compare the exact request/response between your working direct API call and what Dify sends (using a proxy or logging), to spot any subtle differences in headers, endpoint URL, or payload. If the plugin is expecting a specific response structure or status code, even a minor difference could trigger the "invalid" error. If you find a mismatch, sharing those details could help pinpoint the bug.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@hiiamboris commented on GitHub (Oct 15, 2025):
My call looks like this:
But I don't need the username to make it. Maybe plugin is doing something completely uncalled for.
@dosubot[bot] commented on GitHub (Oct 15, 2025):
You're right—your direct API call to Hugging Face's Inference Endpoint doesn't require a username, just the token, model, and input. The Dify plugin, however, enforces a "User Name / Organization Name" field for credential validation, even though it's not needed for the actual API request. This requirement is set in the plugin's config and UI logic, but the credential validation method in the code is empty, so the error likely comes from backend integration or a preflight check that expects this field to match Hugging Face's namespace rules, regardless of whether the API uses it for embeddings requests (plugin code, YAML config, README).
This means the plugin is likely doing an unnecessary or overly strict check, causing the error even when your credentials and endpoint are valid. There isn't a documented workaround or config option to skip this check. If you want to patch it, you could try editing the plugin to relax or bypass the username/org validation for inference endpoints, since the API itself doesn't require it.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@hiiamboris commented on GitHub (Nov 8, 2025):
Learned my lesson. Will not report anything again.