Releases: huggingface/huggingface_hub
[v0.35.3] Fix `image-to-image` target size parameter mapping & tiny agents allow tools list bug
This release includes two bug fixes:
- [Inference] Fix target size mapping for fal-ai's image-to-image in #3399 by @hanouticelina flagged by @iam-tsr
- [Tiny-Agents] Use all tools unless allowed_tools is set explicitly in #3397 by @Mithil467
Full Changelog: v0.35.2...v0.35.3
[v0.35.2] Welcoming Z.ai as Inference Providers!
Full Changelog: v0.35.1...v0.35.2
New inference provider! 🔥
Z.ai is now officially an Inference Provider on the Hub. See full documentation here: https://huggingface.co/docs/inference-providers/providers/zai-org.
from huggingface_hub import InferenceClient
client = InferenceClient(provider="zai-org")
completion = client.chat.completions.create(
model="zai-org/GLM-4.5",
messages=[{"role": "user", "content": "What is the capital of France?"}],
)
print("\nThinking:")
print(completion.choices[0].message.reasoning_content)
print("\nOutput:")
print(completion.choices[0].message.content)
Thinking:
Okay, the user is asking about the capital of France. That's a pretty straightforward geography question.
Hmm, I wonder if this is just a casual inquiry or if they need it for something specific like homework or travel planning. The question is very basic though, so probably just general knowledge.
Paris is definitely the correct answer here. It's been the capital for centuries, since the Capetian dynasty made it the seat of power. Should I mention any historical context? Nah, the user didn't ask for details - just the capital.
I recall Paris is also France's largest city and major cultural hub. But again, extra info might be overkill unless they follow up. Better keep it simple and accurate.
The answer should be clear and direct: "Paris". No need to overcomplicate a simple fact. If they want more, they'll ask.
Output:
The capital of France is **Paris**.
Paris has been the political and cultural center of France for centuries, serving as the seat of government, the residence of the President (Élysée Palace), and home to iconic landmarks like the Eiffel Tower, the Louvre Museum, and Notre-Dame Cathedral. It is also France's largest city and a global hub for art, fashion, gastronomy, and history.
Misc:
[v0.35.1] Do not retry on 429 and skip forward ref in strict dataclass
Full Changelog: v0.35.0...v0.35.1
[v0.35.0] Announcing Scheduled Jobs: run cron jobs on GPU on the Hugging Face Hub!
Scheduled Jobs
In v0.34.0 release, we announced Jobs, a new way to run compute on the Hugging Face Hub. In this new release, we are announcing Scheduled Jobs to run Jobs on a regular basic. Think "cron jobs running on GPU".
This comes with a fully-fledge CLI:
hf jobs scheduled run @hourly ubuntu echo hello world
hf jobs scheduled run "0 * * * *" ubuntu echo hello world
hf jobs scheduled ps -a
hf jobs scheduled inspect <id>
hf jobs scheduled delete <id>
hf jobs scheduled suspend <id>
hf jobs scheduled resume <id>
hf jobs scheduled uv run @weekly train.py
It is now possible to run a command with uv run
:
hf jobs uv run --with lighteval -s HF_TOKEN lighteval endpoint inference-providers "model_name=openai/gpt-oss-20b,provider=groq" "lighteval|gsm8k|0|0"
Some other improvements have been added to the existing Jobs API for a better UX.
- [Jobs] Use current or stored token in a Job secrets by @lhoestq in #3272
- update uv image by @lhoestq in #3270
And finally, Jobs documentation has been updated with new examples (and some fixes):
- Fix bash history expansion in hf jobs example by @nyuuzyou in #3277
- Add timeout info to Jobs guide docs by @davanstrien in #3281
- Update jobs.md by @tre3x in #3297
- docs: Add link to uv-scripts organization in Jobs guide by @davanstrien in #3326
- docs: Add Docker images section for UV scripts in Jobs guide by @davanstrien in #3327
- docs: add link to TRL jobs training documentation by @davanstrien in #3330
CLI updates
In addition to the Scheduled Jobs, some improvements have been added to the hf
CLI.
- [CLI] print help if no command provided by @Wauplin in #3262
- update hf auth whoami output by @hanouticelina in #3274
- Add 'user:' prefix to whoami command output for consistency by @gary149 in #3267
- Whoami: custom message only on unauthorized by @Wauplin in #3288
Inference Providers
Welcome Scaleway and PublicAI!
Two new partners have been integrated to Inference Providers: Scaleway and PublicAI! (as part of releases 0.34.5
and 0.34.6
).
- feat: add scaleway inference provider by @Gnoale in #3356
- Add PublicAI provider by @Wauplin in #3367
Image-to-video
Image to video is now supported in the InferenceClient
:
from huggingface_hub import InferenceClient
client = InferenceClient(provider="fal-ai")
video = client.image_to_video(
"cat.png",
prompt="The cat starts to dance",
model="Wan-AI/Wan2.2-I2V-A14B",
)
- [Inference] Support image to video task by @hanouticelina in #3289
Miscellaneous
Header content-type
is now correctly set when sending an image or audio request (e.g. for image-to-image
task). It is inferred either from the filename or the URL provided by the user. If user is directly passing raw bytes, the content-type header has to be set manually.
A .reasoning
field has been added to the Chat Completion output. This is used by some providers to return reasoning tokens separated from the .content
stream of tokens.
MCP & tiny-agents updates
tiny-agents
now handles AGENTS.md
instruction file (see https://agents.md/).
- allow use of AGENTS.md as well as PROMPT.md by @evalstate in #3317
Tools filtering has already been improved to avoid loading non-relevant tools from an MCP server:
- [MCP] Handle Ollama's deviation from the OpenAI tool streaming spec by @hanouticelina in #3140
- [Tiny Agents] Add tools to config by @NielsRogge in #3242
- fix allowed tools by @Wauplin (direct commit on main)
🛠️ Small fixes and maintenance
🐛 Bug and typo fixes
- Fix bad total size after resuming download by @DKingAlpha in #3234)
- bug fix: only extend path on window sys by @vealocia in #3265
- [Update] HF Jobs Documentation by @ariG23498 in #3268
- Improve Git Credential Helper Detection for Linux (GCM & libsecret support) by @danchev in #3264
- Make requests decode content by @rasmusfaber in #3271
- Add validation warnings for repository limits in upload_large_folder by @davanstrien in #3280
- Include
HF_HUB_DISABLE_XET
in the environment dump by @hanouticelina in #3290 - Add type to job owner by @drbh in #3291
- Update to use only summary bars for uploads when in notebooks by @hoytak in #3243
- Deprecate library/tags/task/... filtering in list_models by @Wauplin in #3318
- Added
apps
as a parameter toHfApi.list_models
by @anirbanbasu in #3322 - Update error message to improve shell compatibility by @aopstudio in #3333
- docs: minor typo fix in /en/guides/manage-cache by @Manith-Ratnayake in #3353
🏗️ internal
- Prepare for v0.35 by @Wauplin in #3261
- fix-ish CI by @Wauplin (direct commit on main)
- Fix lfs test in CI by @Wauplin in #3275
- [Internal] Use
ty
type checker by @hanouticelina in #3294 - [Internal] fix
ty
check quality by @hanouticelina in #3320 - Return early in
is_jsonable
if circular reference by @Wauplin in #3348
Community contributions
The following contributors have made changes to the library over the last release. Thank you!
- @DKingAlpha
- @vealocia
- bug fix: only extend path on window sys (#3265)
- @danchev
- Improve Git Credential Helper Detection for Linux (GCM & libsecret support) (#3264)
- @rasmusfaber
- Make requests decode content (#3271)
- @nyuuzyou
- Fix bash history expansion in hf jobs example (#3277)
- @tre3x
- Update jobs.md (#3297)
- @hoytak
- Update to use only summary bars for uploads when in notebooks (#3243)
- @anirbanbasu
- Added
apps
as a parameter toHfApi.list_models
(#3322)
- Added
- @aopstudio
- Update error message to improve shell compatibility (#3333)
- @Manith-Ratnayake
- docs: minor typo fix in /en/guides/manage-cache (#3353)
- @Gnoale
- feat: add scaleway inference provider (#3356)
[v0.34.6]: Welcoming PublicAI as Inference Providers!
Full Changelog: v0.34.5...v0.34.6
⚡ New provider: PublicAI
Tip
All supported PublicAI models can be found here.
Public AI Inference Utility is a nonprofit, open-source project building products and organizing advocacy to support the work of public AI model builders like the Swiss AI Initiative, AI Singapore, AI Sweden, and the Barcelona Supercomputing Center. Think of a BBC for AI, a public utility for AI, or public libraries for AI.
from huggingface_hub import InferenceClient
client = InferenceClient(provider="publicai")
completion = client.chat.completions.create(
model="swiss-ai/Apertus-70B-Instruct-2509",
messages=[{"role": "user", "content": "What is the capital of Switzerland?"}],
)
print(completion.choices[0].message.content)
[v0.34.5]: Welcoming Scaleway as Inference Providers!
Full Changelog: v0.34.4...v0.34.5
⚡ New provider: Scaleway
Tip
All supported Scaleway models can be found here. For more details, check out its documentation page.
Scaleway is a European cloud provider, serving latest LLM models through its Generative APIs alongside a complete cloud ecosystem.
from huggingface_hub import InferenceClient
client = InferenceClient(provider="scaleway")
completion = client.chat.completions.create(
model="Qwen/Qwen3-235B-A22B-Instruct-2507",
messages=[
{
"role": "user",
"content": "What is the capital of France?"
}
],
)
print(completion.choices[0].message)
[v0.34.4] Support Image to Video inference + QoL in jobs API, auth and utilities
Biggest update is the support of Image-To-Video task with inference provider Fal AI
- [Inference] Support image to video task #3289 by @hanouticelina
>>> from huggingface_hub import InferenceClient
>>> client = InferenceClient()
>>> video = client.image_to_video("cat.jpg", model="Wan-AI/Wan2.2-I2V-A14B", prompt="turn the cat into a tiger")
>>> with open("tiger.mp4", "wb") as f:
... f.write(video)
And some quality of life improvements:
- Add type to job owner #3291 by @drbh
- Include HF_HUB_DISABLE_XET in the environment dump #3290 by @hanouticelina
- Whoami: custom message only on unauthorized #3288 by @Wauplin
- Add validation warnings for repository limits in upload_large_folder #3280 by @davanstrien
- Add timeout info to Jobs guide docs #3281 by @davanstrien
- [Jobs] Use current or stored token in a Job secrets #3272 by @lhoestq
- Fix bash history expansion in hf jobs example #3277 by @nyuuzyou
Full Changelog: v0.34.3...v0.34.4
[v0.34.3] Jobs improvements and `whoami` user prefix
- [Jobs] Update uv image #3270 by @lhoestq
- [Update] HF Jobs Documentation #3268 by @ariG23498
- Add 'user:' prefix to whoami command output #3267 by @gary149
Full Changelog: v0.34.2...v0.34.3
[v0.34.2] Bug fixes: Windows path handling & resume download size fix
- bug fix: only extend path on window sys in #3265 by @vealocia
- Fix bad total size after resuming download in #3234 by @DKingAlpha
Full Changelog: v0.34.1...v0.34.2
[v0.34.1] [CLI] print help if no command provided
Full Changelog: v0.34.0...v0.34.1