Upgrading huggingface-hub 0.21 to 0.22
Breaking0.21.4 → 0.22.2Breaking3New6Changed5Fixed23Other13
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- A deprecated helper for building HTTP headers is gone; use the documented replacement instead.
- Code that reads results from InferenceClient should still work, but a few edge cases may behave differently.
- If your code reads the config from a ModelHubMixin instance, it now lives in a different attribute.
Must act 3 items need code or config changes
What you must change
Breaking3
Removes huggingface_hub.file_download.http_user_agent in favor of huggingface_hub.utils.build_hf_headers.
huggingface_hub.file_download.http_user_agenthuggingface_hub.utils.build_hf_headersInferenceClient methods now return new types that are mostly backward compatible but may cause limited breaking changes versus dataclasses and dicts.
InferenceClientModelHubMixin internals changed, moving config from instance.config to instance._model_hub_mixin, breaking some use cases.
ModelHubMixininstance.configinstance._model_hub_mixin