Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 14 Aug 14:40
· 68 commits to main since this release

Highlights

New block cache (v10) — correctness, integrity, and speed

The file cache was completely redesigned around fixed-size blocks with a self-describing on-disk format (meta.bin + per-chunk CRC + optional gzip/lzma compressed sub-chunks).

  • Content-addressed identity: LFS/Xet files are keyed by their content SHA-256 (LFS oid), so the same object is cached once and is integrity-verifiable; stale pseudo-etags no longer wipe good caches.
  • Range-friendly caching: chunked / resumed downloads now fill the cache block-by-block — any subsequent range request (no matter how the client slices it) hits the cache. Concurrent requests for the same uncached block share a single upstream download (per-block single-flight, cross-process via advisory locks).
  • Resilient reads: a block evicted or corrupted mid-stream is transparently re-fetched instead of failing the client with a 500.
  • Faster cache hits: block presence is an in-memory bitmap built from one scandir() per entry instead of per-block stat() calls (a 512 GB model previously cost ~16 000 stats per download).
  • Safe LFS/Xet caching with automatic object registration and authorization.

Xet support

  • New Xet content route serves Xet-backed files through olah's cache with range support (cache-redirect-model).
  • Opt-in Xet pass-through (xet-passthrough, default off): mirror upstream Xet metadata so the client's native hf_xet downloads very large files (≥ xet-passthrough-min-size, default 50 GB) directly from xethub.hf.co — these files exceed hf_hub's plain-HTTP size cap and cannot flow through a proxy. Includes the /api/.../xet-read-token/... forwarder. Both Xet routes share a single upstream probe.

Multi-worker support

olah-cli --workers N --config config.toml runs N uvicorn workers; the cache is multi-process safe (advisory locks).

Fixes

  • Upstream 4xx is now passed through to clients (404 → EntryNotFound, 401/403 forwarded) instead of an opaque proxy error.
  • Canonical (user-level, org-less) repos are served correctly via paths-info.
  • Offline mode: cached gzip-compressed API responses are detected (magic bytes / content-encoding) and decompressed — fixes the UnicodeDecodeError: byte 0x8b crash.
  • Unreachable upstream returns 504 (not a misleading 401); a warning is logged.
  • Connection check follows redirects (no more false "Failed to reach Huggingface Site" on 307) and runs every 5 minutes.
  • run_server tolerates hand-built argument namespaces; logging hardened.
  • Atomic JSON request cache (tmp+rename); eviction is lock-aware, whole-entry, LRU-by-mtime, and never blocks the event loop.

Dependencies

  • brotli is now a hard dependency (olah-cli previously failed to start without it).
  • Bumped to a verified latest dependency set; dropped Python 3.9 (requires ≥ 3.10).

Full Changelog: v0.4.3...v0.5.0