unsloth/.github/workflows
Daniel Han 2e29363ad9
Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199)
* Stop HF 429 rate limits from sinking the llama.cpp prebuilt path in Studio CI

The Windows Studio API smoke job failed when anonymous huggingface.co
fetches of the tiny GGUF validation model (stories260K.gguf) hit HTTP 429
on the shared runner IP. The installer correctly refused the unvalidated
prebuilt and fell back to a source build, which the prebuilt assert then
flags. Three layers fix this:

1. Installer: auth_headers sends HF_TOKEN (or HUGGING_FACE_HUB_TOKEN) to
   huggingface.co hosts, mirroring the existing GH_TOKEN handling for the
   GitHub API rate limit. A redirect handler strips Authorization when a
   download is redirected off-host (CDN signed URLs reject foreign auth;
   urllib forwards headers on redirect, unlike requests/huggingface_hub).

2. Workflows: the HF_HOME prime steps also prefetch the validation model
   so the install's hf_hub_download resolves from the local cache even
   when the Hub is rate limiting; cache keys bumped v1 to v2 to repopulate.
   This also covers fork PRs, which cannot see secrets.

3. Workflows: every Install Studio / update step that already passes
   GH_TOKEN now also passes HF_TOKEN, so both the huggingface_hub path and
   the direct URL fallback are authenticated.

Tests: tests/studio/install/test_hf_auth.py covers token-to-host routing,
the cross-host redirect strip, and the download_bytes wiring (offline).
Verified live: authenticated download of the validation model through the
new opener (CDN redirect exercised, pinned sha matches) and an offline
hf_hub_download cache hit against an HF_HOME primed by the new step.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-11 06:57:48 -07:00
..
consolidated-tests-ci.yml Tests + CI guard: batched left-padded generation can never silently regress again (#1066, #3699) (#6145) 2026-06-10 08:00:28 -07:00
lint-ci.yml Lint CI: diff import-hoist check against the PR merge-base, not the base tip (#6190) 2026-06-11 04:23:41 -07:00
lockfile-audit.yml ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
mlx-ci.yml MLX CI: drop removed --simple-policy and stale ggml-org pin from the prebuilt step (#6189) 2026-06-11 00:00:50 -07:00
notebooks-ci.yml ci: install unsloth_zoo from git main in notebooks-ci + studio-backend-ci (#5802) 2026-05-27 01:35:13 -07:00
release-desktop.yml Fix Windows workflow issues(#5694) 2026-05-22 05:32:30 -07:00
security-audit.yml ci(security-audit): make package installs network-resilient (#5853) 2026-05-31 01:46:55 -07:00
stale.yml CI: scope GITHUB_TOKEN permissions, add MLX CI, unblock ~60 skipped tests (#5312) 2026-05-11 03:19:13 -07:00
studio-api-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-backend-ci.yml studio/setup.sh: cope with fresh CUDA toolkits like 13.3 (#5826) 2026-05-29 05:09:20 -07:00
studio-frontend-ci.yml Frontend CI: hard-fail unreviewed npm install scripts (#6139) 2026-06-10 06:10:16 -07:00
studio-inference-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-load-orchestrator-ci.yml studio: unblock /load event loop on detect_audio_type (#5642, #5635) (#5669) 2026-05-22 05:47:58 -07:00
studio-mac-api-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-mac-inference-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-mac-install-matrix.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-mac-ui-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-mac-update-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-tauri-smoke.yml ci: drop cache: 'npm' from setup-node (silent abort on Windows) (#5474) 2026-05-15 20:49:05 -07:00
studio-ui-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-update-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-windows-api-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-windows-inference-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-windows-ui-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
studio-windows-update-smoke.yml Studio CI: stop HF 429 rate limits from sinking the llama.cpp prebuilt path (#6199) 2026-06-11 06:57:48 -07:00
version-compat-ci.yml tests: pinned-symbol canary for unsloth-zoo save_pretrained_merged guards (#5410) (#5433) 2026-05-17 01:35:28 -07:00
wheel-smoke.yml ci: drop cache: 'npm' from setup-node (silent abort on Windows) (#5474) 2026-05-15 20:49:05 -07:00