Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit addae5e. Configure here.
Wauplin
approved these changes
Apr 9, 2026
Contributor
Wauplin
left a comment
There was a problem hiding this comment.
(let's wait for a second approval)
hanouticelina
approved these changes
Apr 9, 2026
Contributor
hanouticelina
left a comment
There was a problem hiding this comment.
Looks good! thank you
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

(PR description by @Wauplin)
This PR adds support for the
kernelrepo type to:create_repo/delete_repohf_hub_downloadsnapshot_downloadlist_repo_refslist_repo_fileslist_repo_treeIt also introduces
kernel_infoandKernelInfo.In theory since
kernelrepo type is "just" an additionalrepo_typewe could just updateREPO_TYPESand "it should work out of the box". In practice let's slowly add support when needed and be explicit on what methods are actually supported and tested. I'm pretty sure we'll spot discrepancies in the API along the way.Note that only a few users/orgs can create kernel repos on the Hub. Meaning it is perfectly ok to make "kernels" a shadow feature in
huggingface_hubfor now. Most -if not all- of the usage is expected to be happening from thekernelsPython package (see https://github.com/huggingface/kernels).Note
Medium Risk
Touches core repo-type validation and download/listing paths, so regressions could affect existing repo types if constants or routing assumptions are wrong, though changes are mostly additive and gated behind
repo_type="kernel".Overview
Adds first-class (but explicitly limited) support for the Hub’s new
kernelrepository type.This introduces
KernelInfoplus a newkernel_infoAPI call, expands repo-type validation/URL prefixing to includekernel, and enableshf_hub_download/snapshot_download/list_repo_*/create_repo/delete_repoto acceptrepo_type="kernel"(withsnapshot_downloadfalling back tolist_repo_treesince kernel repo info does not exposesiblings). Documentation is updated to call out the supported surface area, and a newtests/test_kernels.pyexercises the end-to-end kernel flows against staging/production endpoints.Reviewed by Cursor Bugbot for commit ef1dd9a. Bugbot is set up for automated code reviews on this repo. Configure here.