You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: support HF_ENDPOINT environment variable #502
The download path (ModelManagement.download_files_from_huggingface) now reads HF_ENDPOINT from the environment at call time and forwards it to the underlying Hugging Face Hub calls (snapshot_download, model_info, list_repo_tree), so it works even when the endpoint is set after huggingface_hub has already been imported (e.g. via Nexus-hosted HF repositories, as mentioned above).
Quick update on this one, because the diagnosis turned out to be different from the title.
huggingface_hub has read HF_ENDPOINT since v0.5.0 (April 2022), and it resolves
every endpoint parameter against it, so fastembed has always routed to a custom
endpoint as long as the variable is set before the library is imported. I verified
this against fastembed's current download path: with HF_ENDPOINT set.
What actually breaks is narrower. fastembed calls model_info() and list_repo_tree() to verify file metadata before downloading, so it needs three Hub
API routes, where plain snapshot_download needs one. Sonatype Nexus, implements a fixed list of API paths and returns 400 for the
rest. /api/models/{repo}/tree/{rev} was one of the unimplemented ones until Nexus
3.95.0 (August 5, 2026), which added it specifically for snapshot_download and hf download. So on an older Nexus, fastembed failed while other Hugging Face
clients worked, which looks exactly like fastembed ignoring the variable.
I think we can close it for now, but please re-open or create another one if the issue persists!
Activity
pangwangshu commentedon Aug 7, 2026
Opened #667 to add support for
HF_ENDPOINT.The download path (
ModelManagement.download_files_from_huggingface) now readsHF_ENDPOINTfrom the environment at call time and forwards it to the underlying Hugging Face Hub calls (snapshot_download,model_info,list_repo_tree), so it works even when the endpoint is set afterhuggingface_hubhas already been imported (e.g. via Nexus-hosted HF repositories, as mentioned above).PR: #667
pangwangshu commentedon Aug 11, 2026
@NirantK Could you review #667? The implementation is complete, all CodeRabbit feedback is addressed, and tests pass. Ready for merge.
joein commentedon Sep 25, 2026
Quick update on this one, because the diagnosis turned out to be different from the title.
huggingface_hubhas readHF_ENDPOINTsince v0.5.0 (April 2022), and it resolvesevery endpoint parameter against it, so fastembed has always routed to a custom
endpoint as long as the variable is set before the library is imported. I verified
this against fastembed's current download path: with
HF_ENDPOINTset.What actually breaks is narrower. fastembed calls
model_info()andlist_repo_tree()to verify file metadata before downloading, so it needs three HubAPI routes, where plain
snapshot_downloadneeds one. Sonatype Nexus, implements a fixed list of API paths and returns 400 for therest.
/api/models/{repo}/tree/{rev}was one of the unimplemented ones until Nexus3.95.0 (August 5, 2026), which added it specifically for
snapshot_downloadandhf download. So on an older Nexus, fastembed failed while other Hugging Faceclients worked, which looks exactly like fastembed ignoring the variable.
I think we can close it for now, but please re-open or create another one if the issue persists!