exo-explore/exo · error · HuggingFaceAuthenticationError
{msg}
Error message
{msg} What it means
Error "{msg}" thrown in exo-explore/exo.
Source
Thrown at src/exo/download/download_utils.py:503
async def _fetch_file_list(
model_id: ModelId, revision: str = "main", path: str = "", recursive: bool = False
) -> list[FileListEntry]:
api_url = f"{get_hf_endpoint()}/api/models/{model_id}/tree/{revision}"
url = f"{api_url}/{path}" if path else api_url
# ?recursive=true returns the whole subtree in one request
if recursive:
url = f"{url}?recursive=true"
headers = await get_download_headers()
async with (
create_http_session(timeout_profile="short") as session,
session.get(url, headers=headers) as response,
):
if response.status in [401, 403]:
msg = await _build_auth_error_message(response.status, model_id)
raise HuggingFaceAuthenticationError(msg)
elif response.status == 429:
raise HuggingFaceRateLimitError(
f"HuggingFace rate limit hit fetching file list for {model_id}",
retry_after=_parse_retry_after(response.headers),
)
elif response.status == 200:
data_json = await response.text()
data = TypeAdapter(list[FileListEntry]).validate_json(data_json)
files: list[FileListEntry] = []
for item in data:
if item.type == "file":
files.append(FileListEntry.model_validate(item))
elif item.type == "directory" and recursive:
# already inlined by ?recursive=true
continue
if recursive and len(data) >= 1000:
# HF tree endpoint paginates at 1000; we don't follow cursors
logger.warning(View on GitHub (pinned to 21a54c5ea0)
When it happens
Trigger: Thrown at src/exo/download/download_utils.py:503 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of exo-explore/exo@21a54c5ea0 (2026-08-26).
Data as JSON: /api/errors/b34cc0f5adea636c.
Report an issue: GitHub.