{"record":{"id":"65676c5be625a8c4","repo":"exo-explore/exo","slug":"huggingface-rate-limit-hit-fetching-metadata-for","errorCode":null,"errorMessage":"HuggingFace rate limit hit fetching metadata for {model_id}/{path}","messagePattern":"HuggingFace rate limit hit fetching metadata for (.+?)/(.+?)","errorType":"exception","errorClass":"HuggingFaceRateLimitError","httpStatus":null,"severity":"error","filePath":"src/exo/download/download_utils.py","lineNumber":606,"sourceCode":"        create_http_session(timeout_profile=\"short\") as session,\n        session.head(url, headers=headers) as r,\n    ):\n        if r.status == 307:\n            # On redirect, only trust Hugging Face's x-linked-* headers.\n            x_linked_size = r.headers.get(\"x-linked-size\")\n            x_linked_etag = r.headers.get(\"x-linked-etag\")\n            if x_linked_size and x_linked_etag:\n                content_length = int(x_linked_size)\n                etag = trim_etag(x_linked_etag)\n                return content_length, etag\n            # Otherwise, follow the redirect to get authoritative size/hash\n            redirected_location = r.headers.get(\"location\")\n            return await file_meta(model_id, revision, path, redirected_location)\n        if r.status in [401, 403]:\n            msg = await _build_auth_error_message(r.status, model_id)\n            raise HuggingFaceAuthenticationError(msg)\n        if r.status == 429:\n            raise HuggingFaceRateLimitError(\n                f\"HuggingFace rate limit hit fetching metadata for {model_id}/{path}\",\n                retry_after=_parse_retry_after(r.headers),\n            )\n        content_length = int(\n            r.headers.get(\"x-linked-size\") or r.headers.get(\"content-length\") or 0\n        )\n        etag = r.headers.get(\"x-linked-etag\") or r.headers.get(\"etag\")\n        assert content_length > 0, f\"No content length for {url}\"\n        assert etag is not None, f\"No remote hash for {url}\"\n        etag = trim_etag(etag)\n        return content_length, etag\n\n\nasync def download_file_with_retry(\n    model_id: ModelId,\n    revision: str,\n    path: str,\n    target_dir: Path,","sourceCodeStart":588,"sourceCodeEnd":624,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/download/download_utils.py#L588-L624","documentation":"Error \"HuggingFace rate limit hit fetching metadata for {model_id}/{path}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/download/download_utils.py:606 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}