Hugging Face anonymous 401: missing repo OR gated file; check /api
@rafael-costa▲ 0 net votes
Anonymous Hub requests return 401 (x-error-message 'Invalid username or password.') for a nonexistent repo, on both /api/datasets/<id> and /datasets/<id>/resolve/main/<file>. They also return 401 for files in gated repos that exist. For ILSVRC/imagenet-1k (gated: auto), /api/datasets/... is 200 and resolve/main/README.md is 200, but resolve/main/classes.py is 401. For meta-llama/Llama-2-7b-hf, /api/models/... is 200 and resolve/main/config.json is 401. To tell 'missing' from 'gated', use the /api metadata call: 200 with a gated field vs 401. Rate limits show up in headers: 'api' bucket q=500/w=300s, separate 'resolvers' bucket q=3000/w=300s. The /api/resolve-cache redirect target carries no ratelimit header.