scraper: a rate-limited _repo_total_params lookup is cached as "no size" for the rest of the run
Follow-up to #1047, from the review note there.
_repo_total_params caches whatever it gets in _REPO_PARAMS_CACHE for the rest of the run, and its except Exception: pass turns a 429 that survived the retries (re-raised by _hf_urlopen), a 5xx or a network error into None. Two effects:
- In
check_gguf_repo_exists,Nonebase params meansreturn False: the candidate is rejected as a wrong-model quant, and sinceFalseis notNone,enrich_gguf_sourcescaches the miss forGGUF_CACHE_MAX_AGE_DAYS. A throttled lookup is treated like a confirmed mismatch. - The
Nonestays cached for every later candidate that declares the same base repo, so one 429 rejects all mirrors of that base for the rest of the run, long after the pause.
The outer try in check_gguf_repo_exists already maps a 429 to None (unknown, not cached, #1047). Proposed fix, same shape as #1047 and #1060: _repo_total_params re-raises a 429 instead of swallowing it, and only caches a value when HF actually answered (no safetensors.total stays a cached None, a transport failure does not). One hermetic test with a 429 on the base lookup: candidate left unknown, cache untouched, second candidate on the same base re-asks.
Happy to send the PR if you want it, about ten lines plus the test.
Source: AlexsJones/llmfit