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
gateway: serve the HF /api/ subset (revision, tree) so snapshot_download works against a namespace host #2617
Follow-up to #2593 (public gateway) and the HF_ENDPOINT shim.
Today.https://<ns>.<host> serves GET|HEAD /<repo>/resolve/<rev>/<file> with X-Repo-Commit, ETag/X-Linked-Etag and X-Linked-Size, so hf_hub_download works. snapshot_download, HfApi.model_info, list_repo_files and the transformers/datasets loaders that call them first ask /api/models/<repo>/revision/<rev> (and /api/datasets/...) and /api/models/<repo>/tree/<rev>?recursive=true, which the gateway does not serve (adr/appendix-gateway.md § HF_ENDPOINT says so).
Ask. Serve the read-only /api/ subset from the bundle manifest: revision/<rev> returning {"sha": <commit>, "siblings": [{"rfilename": ...}], ...} and tree/<rev> returning the entries under <repo>/ with path, size, oid/lfs.oid (the entry hash), paginated as the hub does. Same revision rule as resolve (main or the commit); 404 otherwise. Cheap: the manifest is cached already. Decide what oid is (BLAKE3 hex is not a git blob sha; #2595 may give a SHA-256 alias).
Why.snapshot_download is how most model code fetches a repo; without /api/ a HF_ENDPOINT pointed at the gateway fails before the first file.
Activity