Skip to content

fix(deps): bump hf_xet>=1.6.0 so HF_ENDPOINT proxying works for Xet downloads - #110

Open
deanq wants to merge 3 commits into
runpod-workers:mainfrom
deanq:fix/bump-hf-xet-for-hf-endpoint
Open

deanq wants to merge 3 commits into
runpod-workers:mainfrom
deanq:fix/bump-hf-xet-for-hf-endpoint

Conversation

@deanq

@deanq deanq commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

The bug

The serverless worker base image ships huggingface_hub 1.6.0 + hf_xet 1.3.2 (pinned in uv.lock). hf_xet 1.3.2 fetches Xet "xorb" byte ranges directly from the HuggingFace CAS/CDN — it ignores the file-reconstruction manifest's per-xorb URLs.

This silently breaks any transparent HuggingFace proxy/cache configured via the standard HF_ENDPOINT env var. The worker correctly routes the hub API and the Xet reconstruction request through HF_ENDPOINT, but then fetches the actual bytes straight from the CAS, bypassing the proxy entirely.

Reproduction

Platform-independent — no Flash needed. Run a stock huggingface_hub + hf_xet client with HF_ENDPOINT pointed at a proxy that rewrites the reconstruction manifest's xorb URLs, and download a Xet-backed model:

  • hf_xet==1.3.2 (with huggingface_hub==1.6.0): the proxy sees the reconstruction request but zero xorb-byte requests → bytes fetched direct from CAS.
  • hf_xet==1.6.0 (with huggingface_hub==1.32.0): the proxy sees the xorb-byte requests → bytes flow through the proxy.

Verified in a plain python:3.12-slim container both ways, and live on a Flash serverless CPU worker whose reported versions were exactly 1.3.2 / 1.6.0.

Why both packages bump together

hf_xet==1.3.2 is incompatible with huggingface_hub==1.32.0 (pip resolution conflict), and hf_xet is a transitive dependency of huggingface_hub. So the fix is a coupled upgrade: raising huggingface_hub to >=1.32.0 pulls hf_xet>=1.6.0.

The fix

  • Raise the huggingface_hub floor in pyproject.toml from >=0.32.0 to >=1.32.0 (with a comment explaining the coupling) so the fix is durable and self-documenting — hf_xet has no direct entry to pin.
  • Regenerate uv.lock via uv lock --upgrade-package huggingface_hub --upgrade-package hf-xet.

Resulting lock changes:

package before after
hf-xet 1.3.2 1.6.0
huggingface-hub 1.6.0 1.32.0
click 8.3.1 8.5.0

click bumps because huggingface_hub 1.32.0 adds a direct dependency on it; it is a required transitive consequence, not an unrelated change. (worker-flash also updates 1.5.0 → 1.6.0 in the lock, syncing pre-existing drift against the pyproject version.)

Verification

  • uv lock re-resolves cleanly; uv sync --frozen installs hf-xet 1.6.0 / huggingface-hub 1.32.0.
  • Full test suite passes: 293 passed.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

…ownloads

hf_xet 1.3.2 fetches Xet xorb byte ranges directly from the HF CAS/CDN,
ignoring the reconstruction manifest's per-xorb URLs, so a transparent
HF_ENDPOINT proxy/cache is bypassed for the actual bytes. hf_xet 1.6.0
routes xorb fetches through the reconstruction URLs. hf_xet 1.6.0 requires
huggingface_hub 1.32.0, so both are bumped together.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant