feat(sync): add Hugging Face provider sync#2678
Open
hanouticelina wants to merge 1 commit into
Open
Conversation
Mirror the existing daily model-catalog sync for the Hugging Face Inference Providers router (https://router.huggingface.co/v1/models), modeled on the baseten provider. The router is an aggregator: each model is served by several inference providers with their own pricing, context window, and capabilities, and requests are routed to the fastest one. The provider collapses them into the route a request would actually take -- pricing and context from the highest-throughput provider, with tool/structured-output support taken from any provider since a caller can pin a slower one. New models are created via canonical base_model resolution (the same resolveCanonicalBaseModel/factorBaseModel path baseten uses); unmappable or unpriced models are skipped and reported in a notice. For now the sync only creates new models -- existing curated TOMLs are left untouched via sameModel -- and never deletes (deleteMissing: false). HF_TOKEN is optional; the router model list is public. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PzQSYd3VwBK5NAsC9dYmSw
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.
Summary
SyncProviderregistry and the hourly sync matrix.base_modelmetadata in/modelshuggingface:sync.base_model behavior
Each router model is matched to a canonical model already present in /models (via the shared
resolveCanonicalBaseModel/factorBaseModel). When a match is found, the generated.tomlcontains only the fields unique to the router (cost, context, capabilities) and inherits the rest; models with no canonical match or no priced provider are skipped and reported in a notice.HF_TOKENis optional - the model list is public.Verification
GET https://router.huggingface.co/v1/modelsreturned 126 modelsembeddings + MiMo-V2-Flash) deleted
A created entry stays minimal - the rest is inherited from its
base_model: