Change8

v1.27.0

Breaking Changes
📦 huggingface-hubView on GitHub →
2 breaking5 features🐛 3 fixes🔧 14 symbols

Summary

This release enhances the `hf-cli` with automatic installation and synchronization, introduces flexible engine flag management for Inference Endpoints, and adds Baseten as a new inference provider. It also includes several quality-of-life improvements and bug fixes.

⚠️ Breaking Changes

  • The `--container-command` and `--container-args` flags for `hf endpoints deploy` and `hf endpoints update` now replace existing values instead of appending to them. To reset to the image default, pass an empty string. To leave the values untouched, omit the flag.
  • The `HfApi.space_info` and `HfApi.list_spaces` methods now accept and type the `region` property for Spaces, which can be `"us"`, `"eu"`, or `None`.

Migration Steps

  1. If you previously relied on `--container-args` or `--container-command` appending values, update your scripts to explicitly set the desired values, or pass an empty string to reset to defaults.
  2. Ensure your `hf-xet` installation is at least version 1.5.2 to avoid potential hangs on poor networks.

✨ New Features

  • The `hf-cli` skill is now installed globally by default with the standalone installers (`bash` and `PowerShell`).
  • The `hf update` command now refreshes the `hf-cli` skill.
  • The `hf` CLI now provides hints when the `hf-cli` skill is missing or outdated.
  • The `--container-command` and `--container-args` flags can now be used without `--custom-image` for Inference Endpoints, and can be changed after deployment.
  • Baseten is now supported as an inference provider for the `conversational` task, offering an OpenAI-compatible chat completions API.

🐛 Bug Fixes

  • Fixed bucket prefix collisions in `HfFileSystem` where `exists()` could raise `KeyError` and `ls()` could return unrelated siblings.
  • Stopped deleting snapshot files twice when deleting a revision in the cache, preventing `FileNotFoundError` tracebacks.
  • Prevented retaining caller frames when falling back to cache after a failed HEAD call in download operations, resolving issues with vLLM and `http_backoff` retries.

Affected Symbols