v1.9.0
Breaking Changes📦 huggingface-hubView on GitHub →
⚠ 2 breaking✨ 6 features🐛 7 fixes🔧 20 symbols
Summary
This release introduces mounted volumes for Hugging Face Spaces, replacing deprecated persistent storage, and significantly enhances the CLI by auto-detecting AI agents to provide machine-readable output formats. It also adds support for installing skills directly from the marketplace.
⚠️ Breaking Changes
- The deprecated persistent storage feature is replaced by the new mounted volumes feature for Hugging Face Spaces. Users relying on persistent storage must migrate to using the new Volume API or CLI flags.
- The minimum required Python version has been bumped from 3.9 to 3.10.
Migration Steps
- If using persistent storage for Hugging Face Spaces, migrate configuration to use the new `Volume` API or CLI `--volume` / `-v` flags.
- Ensure your environment uses Python 3.10 or newer.
✨ New Features
- Spaces now support mounting volumes (models, datasets, buckets) directly via filesystem access using `set_space_volumes` or during creation/duplication.
- The `hf` CLI now auto-detects when running inside an AI coding agent and adapts output format (no ANSI, tab-separated tables, compact JSON) for better machine parsing.
- The `hf` CLI output format can now be explicitly forced using `--format` (e.g., `agent`, `json`, `quiet`).
- The `hf skills add` command now supports installing skills directly from the Hugging Face skills marketplace.
- The CLI now auto-installs official HF CLI extensions on first invocation.
- Added `HF_HUB_DISABLE_SYMLINKS` environment variable to force cache operations to avoid using symlinks.
🐛 Bug Fixes
- Fixed PyTorchModelHubMixin failing to call .eval() when loading safetensors models.
- Added regression test after bumping to hf-xet 1.4.3.
- Added validation for shard filenames within sharded checkpoint index files.
- Fixed an issue in the `test_create_commit_conflict` test.
- Ensured CACHEDIR.TAG file is not scanned in the cache.
- Deduplicated repository folder name generation logic.
- Fixed cross-type confusion validation errors when using `bool` or `int` in strict dataclasses decorated with `@strict`.
Affected Symbols
huggingface_hub.HfApi.set_space_volumeshuggingface_hub.Volumecreate_repoduplicate_repohf repos createhf repos duplicatehf models lshf models infohf datasets lshf datasets infohf datasets parquethf datasets sqlhf spaces lshf spaces infohf papers lshf papers searchhf auth whoamihf skills addhf skills upgradePyTorchModelHubMixin