github huggingface/huggingface_hub v1.2.0.rc0
v1.2.0: Smarter Rate Limit Handling, Daily Papers API and more QoL improvements!

pre-release4 hours ago

🚦 Smarter Rate Limit Handling

We've improved how the huggingface_hub library handles rate limits from the Hub. When you hit a rate limit, you'll now see clear, actionable error messages telling you exactly how long to wait and how many requests you have left.

HfHubHTTPError: 429 Too Many Requests for url: https://huggingface.co/api/models/username/reponame.
Retry after 55 seconds (0/2500 requests remaining in current 300s window).

When a 429 error occurs, the SDK automatically parses the RateLimit header to extract the exact number of seconds until the rate limit resets, then waits precisely that duration before retrying. This applies to file downloads (i.e. Resolvers), uploads, and paginated Hub API calls (list_models, list_datasets, list_spaces, etc.).

More info about Hub rate limits in the docs 👉 here.

✨ HF API

Daily Papers endpoint: You can now programmatically access Hugging Face's daily papers feed. You can filter by week, month, or submitter, and sort by publication date or trending.

from huggingface_hub import list_daily_papers

for paper in list_daily_papers(date="2025-12-03"):
    print(paper.title)

# DeepSeek-V3.2: Pushing the Frontier of Open Large Language Models
# ToolOrchestra: Elevating Intelligence via Efficient Model and Tool Orchestration
# MultiShotMaster: A Controllable Multi-Shot Video Generation Framework
# Deep Research: A Systematic Survey
# MG-Nav: Dual-Scale Visual Navigation via Sparse Spatial Memory
...

Add daily papers endpoint by @BastienGimbert in #3502
Add more parameters to daily papers by @Samoed in #3585

Offline mode helper: we recommend using huggingface_hub.offline_mode() to check whether offline mode is enabled instead of checking HF_HUB_OFFLINE directly.

Add offline_mode helper by @Wauplin in #3593

Inference Endpoints: You can now configure scaling metrics and thresholds when deploying endpoints.

feat(endpoints): scaling metric and threshold by @oOraph in #3525

Exposed utilities: RepoFile and RepoFolder are now available at the root level for easier imports.

Expose RepoFile and RepoFolder at root level by @Wauplin in #3564

⚡️ Inference Providers

OVHcloud AI Endpoints was added as an official Inference Provider in v1.1.5. OVHcloud provides European-hosted, GDPR-compliant model serving for your AI applications.

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="openai/gpt-oss-20b:ovhcloud",
    messages=[
        {
            "role": "user",
            "content": "What is the capital of France?"
        }
    ],
)

print(completion.choices[0].message)

Add OVHcloud AI Endpoints as an Inference Provider by @eliasto in #3541

We also added support for automatic speech recognition (ASR) with Replicate, so you can now transcribe audio files easily.

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="replicate",
    api_key=os.environ["HF_TOKEN"],
)

output = client.automatic_speech_recognition("sample1.flac", model="openai/whisper-large-v3")

[Inference Providers] Add support for ASR with Replicate by @hanouticelina in #3538

The truncation_direction parameter in InferenceClient.feature_extraction ( (and its async counterpart) now uses lowercase values ("left"/"right" instead of "Left"/"Right") for consistency with other specs. The Async counterpart has been updated as well

[Inference] Use lowercase left/right truncation direction parameter by @Wauplin in #3548

📁 HfFileSystem

HfFileSystem: A new top-level hffs alias make working with the filesystem interface more convenient.

>>> from huggingface_hub import hffs
>>> with hffs.open("datasets/fka/awesome-chatgpt-prompts/prompts.csv", "r") as f:
...     print(f.readline())
"act","prompt"
"An Ethereum Developer","Imagine you are an experienced Ethereum developer tasked..."

[HfFileSystem] Add top level hffs by @lhoestq in #3556
[HfFileSystem] Add expand_info arg by @lhoestq in #3575

💔 Breaking Change

Paginated results when listing user access requests: list_pending_access_requests, list_accepted_access_requests, and list_rejected_access_requests now return an iterator instead of a list. This allows lazy loading of results for repositories with a large number of access requests. If you need a list, wrap the call with list(...).

Paginated results in list_user_access by @Wauplin in #3535

🔧 Other QoL Improvements

📖 Documentation

🛠️ Small fixes and maintenance

🐛 Bug and typo fixes

🏗️ Internal

Significant community contributions

The following contributors have made significant changes to the library over the last release:

Don't miss a new huggingface_hub release

NewReleases is sending notifications on new releases.