Change8

Migrating to HuggingFace Hub v1.2.0

Version v1.2.0 introduces 1 breaking change. This guide details how to update your code.

Released: 12/4/2025

1
Breaking Changes
3
Migration Steps
13
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

list_pending_access_requestslist_accepted_access_requestslist_rejected_access_requestsHfHubHTTPErrorlist_daily_papersis_offline_modeHF_HUB_OFFLINEInferenceClient.feature_extractionRepoFileRepoFolderhffsInferenceClient.automatic_speech_recognitionget_hf_file_metadata

Breaking Changes

Issue #1

Paginated results from `list_pending_access_requests`, `list_accepted_access_requests`, and `list_rejected_access_requests` now return an iterator instead of a list. To maintain previous behavior, wrap the call with `list(...)`.

Migration Steps

  1. 1
    If you rely on the return type of `list_pending_access_requests`, `list_accepted_access_requests`, or `list_rejected_access_requests` being a list, wrap the call with `list(...)` to maintain the old behavior: e.g., `list(list_pending_access_requests(...))`.
  2. 2
    Use `huggingface_hub.is_offline_mode()` instead of checking `HF_HUB_OFFLINE` directly.
  3. 3
    When using `InferenceClient.feature_extraction`, ensure `truncation_direction` parameters use lowercase values ("left"/"right").

Release Summary

This release significantly enhances rate limit handling with automatic retries and clearer errors, introduces the daily papers endpoint, and adds OVHcloud as a new Inference Provider. It also includes a breaking change where several access request listing functions now return iterators instead of lists.

Need More Details?

View the full release notes and all changes for HuggingFace Hub v1.2.0.

View Full Changelog