Loop icon
Download icon
Get icon
Script icon
If icon
ChatCompletion icon
GoogleGemini icon
SlackIncomingWebhook icon
Set icon
Schedule icon

Know When a Hugging Face Model You Depend On Changes Upstream

Check the Hugging Face models you use every day and alert in Slack on new commits, changed weights or tokenizers, license or gating changes, with AI impact.

Categories
AIInfrastructure

Most services load Hugging Face models from main: vLLM, TGI, transformers and sentence-transformers all default to the latest revision. When the authors push new weights, fix a tokenizer, edit the chat template or change the license, the next restart quietly picks it up. Outputs shift, embeddings stop matching the index, or the terms of use change, and nobody connects it to the model repository.

This blueprint checks each model you depend on through the public Hub API and reports, once:

  • new commits on main, with every added, modified or deleted file classified as weights, tokenizer / chat template, config, card / license or other;
  • a change of license or gating, or the model being disabled;
  • the model disappearing (deleted, renamed or made private), through the errors branch.

Gemini reads the changed files, the commit titles and how you use the model, and rates the impact (NONE, LOW, HIGH) with one action. Slack gets the Hub facts as they are, never from the model, plus the revision to pin if you want to stay on the previous version.

How it works

For each entry in models (Loop, four at a time):

  1. fetch_model, fetch_files and fetch_commits download the metadata, the file hashes on main and the recent commits.
  2. load_previous reads the state recorded at the last run from the Kestra KV store.
  3. compare lists changed files, new commits, and license or gating changes.
  4. if_changed skips the LLM and Slack when nothing changed. The first run only records each model.
  5. assess_impact returns JSON (impact, summary, action) from Gemini.
  6. alert_owner posts the facts and the assessment.
  7. remember_state stores the state for the next comparison, after the alert.

Prerequisites

  • A Gemini API key and a Slack Incoming Webhook. The Hub API is public for public models, so no Hugging Face token is needed. For gated models (such as Llama) and private ones, the commit history needs a token: add headers: {Authorization: "Bearer {{ secret('HF_TOKEN') }}"} to the three download tasks, with a read token from your Hugging Face settings.

Secrets

  • GEMINI_API_KEY: Google AI Studio API key for the impact assessment.
  • SLACK_WEBHOOK_URL: Slack Incoming Webhook URL for alerts and failures.

In the open-source edition, secrets are environment variables on the Kestra container, prefixed with SECRET_ and base64-encoded. See how to manage secrets.

Inputs

  • models (JSON): list of {"id", "usage", "owner"} objects. The usage line is what makes the assessment specific: say how the model is loaded and what depends on its outputs.
  • model_name (STRING, default gemini-2.5-flash): the Gemini model.

Quick start

  1. Add both secrets and list the models your services load.
  2. Execute the flow once to record their current state.
  3. Enable daily. When a HIGH change is posted, pin the previous revision or run your evaluation suite before the next deploy.

To swap Gemini for another provider, change the provider block of assess_impact; see the AI plugin providers.

Outputs

  • {{ outputs.compare.vars }} per iteration: sha, license, changes, commits, facts.
  • {{ outputs.assess_impact.jsonOutput }}: the AI assessment for changed models.
  • KV entries hf_model_<id>: the state recorded at the last run.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.