404 error returned when using the Hugging Face Inference API from Dify #329

Closed
opened 2026-02-16 10:19:01 -05:00 by yindo · 1 comment
Owner

Originally created by @fukuda-masayuki on GitHub (Jun 1, 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 Dify issues & Dify Official Plugins, 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

1.4.0

Plugin version

0.0.4

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Overview

When selecting Hugging Face Inference API as an Embedding model in Dify and attempting to register the model intfloat/multilingual-e5-large-instruct, a 404 error occurs.

Steps to Reproduce

  1. Open Models → Add → Embedding model.
  2. Select Hugging Face Inference API as the provider.
  3. Enter an access token with read scope only.
  4. Set Model name to intfloat/multilingual-e5-large-instruct and click Save.
  5. A 404 error is returned during the save process.

Expected Behavior

The model should be registered successfully, and test requests should execute without errors.

Additional Information

cURL Comparison

Successful request

curl -L \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  https://router.huggingface.co/hf-inference/models/intfloat/multilingual-e5-large-instruct/pipeline/feature-extraction \
  -d '{"inputs": ["hello"] }'

Failed request

curl -L \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  https://api-inference.huggingface.co/pipeline/feature-extraction/intfloat/multilingual-e5-large-instruct \
  -d '{"inputs": ["hello"] }'

Suspected Cause

Starting around late-2024, Hugging Face Inference API migrated to router-based URLs.
Dify still issues requests to the older URL pattern (https://api-inference.huggingface.co/pipeline/...), which now returns 404.
Related discussion about the endpoint change (different model):
https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/discussions/116

✔️ Error log

404 Client Error: Not Found for url: https://api-inference.huggingface.co/pipeline/feature-extraction/intfloat/multilingual-e5-large-instruct
(Request ID: Root=1-683b4db9-1e980b4c755dcffd2fc32730; bdc8fc2e-733e-4d9b-afee-955f5c940bdb)
Originally created by @fukuda-masayuki on GitHub (Jun 1, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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 1.4.0 ### Plugin version 0.0.4 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ## Overview When selecting Hugging Face Inference API as an Embedding model in Dify and attempting to register the model intfloat/multilingual-e5-large-instruct, a 404 error occurs. ## Steps to Reproduce 1. Open Models → Add → Embedding model. 2. Select Hugging Face Inference API as the provider. 3. Enter an access token with read scope only. 4. Set Model name to intfloat/multilingual-e5-large-instruct and click Save. 5. A 404 error is returned during the save process. ## Expected Behavior The model should be registered successfully, and test requests should execute without errors. ## Additional Information cURL Comparison ### Successful request ``` curl -L \ -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ https://router.huggingface.co/hf-inference/models/intfloat/multilingual-e5-large-instruct/pipeline/feature-extraction \ -d '{"inputs": ["hello"] }' ``` ### Failed request ``` curl -L \ -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer <YOUR_TOKEN>" \ https://api-inference.huggingface.co/pipeline/feature-extraction/intfloat/multilingual-e5-large-instruct \ -d '{"inputs": ["hello"] }' ``` ## Suspected Cause Starting around late-2024, Hugging Face Inference API migrated to router-based URLs. Dify still issues requests to the older URL pattern (https://api-inference.huggingface.co/pipeline/...), which now returns 404. Related discussion about the endpoint change (different model): https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/discussions/116 ### ✔️ Error log ``` 404 Client Error: Not Found for url: https://api-inference.huggingface.co/pipeline/feature-extraction/intfloat/multilingual-e5-large-instruct (Request ID: Root=1-683b4db9-1e980b4c755dcffd2fc32730; bdc8fc2e-733e-4d9b-afee-955f5c940bdb) ```
yindo added the bug label 2026-02-16 10:19:01 -05:00
yindo closed this issue 2026-02-16 10:19:01 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 17, 2025):

Hi, @fukuda-masayuki. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a 404 error when registering the Hugging Face model intfloat/multilingual-e5-large-instruct as an embedding model in Dify v1.4.0 self-hosted.
  • The error occurs during saving despite using a valid read-scope token.
  • Direct cURL requests to the Hugging Face endpoint work fine, indicating the token and endpoint are valid.
  • This suggests a possible mismatch in the API endpoints Dify uses for model registration.
  • No further activity or comments have been posted on this issue.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here to keep the discussion open.
  • Otherwise, I will automatically close this issue in 5 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 17, 2025): Hi, @fukuda-masayuki. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a 404 error when registering the Hugging Face model intfloat/multilingual-e5-large-instruct as an embedding model in Dify v1.4.0 self-hosted. - The error occurs during saving despite using a valid read-scope token. - Direct cURL requests to the Hugging Face endpoint work fine, indicating the token and endpoint are valid. - This suggests a possible mismatch in the API endpoints Dify uses for model registration. - No further activity or comments have been posted on this issue. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here to keep the discussion open. - Otherwise, I will automatically close this issue in 5 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#329