{
  "slug": "huggingface-hub-adds-centralized-hf-uri-and-mount-parsing-f234db8a14f9",
  "title": "huggingface_hub adds centralized hf:// URI and mount parsing",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-30T11:48:16.000Z",
  "announced_at": "2026-04-30T11:48:16.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When code accepts Hugging Face Hub locations or volume mount strings, parse locations with `parse_hf_uri` and mounts with `parse_hf_mount`. Call `.to_uri()` on each parsed value to emit its canonical string.",
    "examples": [
      "from huggingface_hub import parse_hf_uri, parse_hf_mount\n\nuri = parse_hf_uri(\"hf://datasets/<namespace>/<dataset>@refs/pr/3/train.json\")\ncanonical_uri = uri.to_uri()\n\nmount = parse_hf_mount(\"hf://buckets/<namespace>/<bucket>/sub/dir:/mnt:ro\")\ncanonical_mount = mount.to_uri()"
    ],
    "gotchas": [
      "Version: v1.13.0",
      "uri (required): `parse_hf_uri` input. HF URI syntax is `hf://[<TYPE>/]<ID>[@<REVISION>][/<PATH>]`; ID is `<namespace>/<name>`. Type prefix is optional for models; datasets, spaces, kernels, and buckets use plural prefixes. Revision is optional and applies to repos; path is optional.",
      "endpoint: A custom Hub endpoint used by `parse_hf_uri` to recognize web URLs on that endpoint; it has no effect on `hf://` URIs.",
      "mount_str (required): `parse_hf_mount` input; must start with `hf://` and include a mount path. Syntax: `hf://[<TYPE>/]<ID>[@<REVISION>][/<PATH>]:<MOUNT_PATH>[:ro|:rw]`.",
      "<MOUNT_PATH> (required): Absolute local mount path; must start with `/`.",
      ":ro | :rw: Optional read-only or read-write flag; the documented alternatives are mutually exclusive.",
      "Prerequisite: Use the v1.13.0-or-later `huggingface_hub` library version containing these helpers.",
      "Prerequisite: The helpers parse strings without network calls; no authentication setup is documented for parsing.",
      "The parsers are pure string parsers and make no network calls.",
      "The parser handles repo type prefixes, revisions, and paths and rejects invalid URI shapes."
    ]
  },
  "why_it_matters": "When maintaining code that accepts Hub locations or volume mount specifications, parse and round-trip their `hf://` strings with the library helpers.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v1.13.0",
    "https://github.com/huggingface/huggingface_hub/pull/4158",
    "https://github.com/huggingface/huggingface_hub/blob/v1.13.0/docs/source/en/package_reference/hf_uris.md",
    "https://huggingface.co/docs/huggingface_hub/package_reference/hf_uris"
  ],
  "rank": 0.92024,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-bb06c8ee38e25564-7:gate",
    "evidence_hash": "8f11d99c2b64c04df88abf2e4573c6956cf9e268985d5a90173daf68c79513ac"
  },
  "review": {
    "draft_hash": "8ecc224fff20072dcda7c5aa4167d7017457da0dc8ea7132b100f9f82f94415e",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.92 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
