Migrating to HuggingFace Hub v1.22.0
Version v1.22.0 introduces 2 breaking changes. This guide details how to update your code.
Released: 7/3/2026
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
SandboxSandbox.createSandboxPoolSandbox.runhf sandboxSandbox.proxy_url_forsnapshot_downloadhf_hub_downloadIncompleteSnapshotErrortyper_factoryupload_large_folderupload_folderhf upload-large-folderhf uploadfilter_repo_objectsallow_patternsignore_patternsget_dataset_leaderboardhf cache lshf cache prunehf discussions edithttp_backoffhf jobs runhf jobs scheduled triggerBreaking Changes
●Issue #1
The `upload_large_folder` function and `hf upload-large-folder` CLI command are deprecated in favor of `upload_folder` / `hf upload`, which now handle large and resumable uploads.
●Issue #2
`allow_patterns`/`ignore_patterns` matching in repository object filtering is now case-sensitive on all platforms. On Windows, patterns like `*.PDF` will no longer match `file.pdf`.
Migration Steps
- 1If you relied on case-insensitive pattern matching for filtering repository objects on Windows (e.g., using `*.PDF`), update your patterns to match the exact case of the filenames.
- 2Replace usage of `upload_large_folder` or `hf upload-large-folder` with `upload_folder` or `hf upload` respectively.
Release Summary
This release introduces Sandboxes, isolated cloud machines accessible via API and CLI, and significantly speeds up snapshot downloads by caching repository tree listings. The underlying CLI framework was also migrated from Typer to Click.
Need More Details?
View the full release notes and all changes for HuggingFace Hub v1.22.0.
View Full Changelog