Skip to content

fix: return upstream 4xx instead of 504 for canonical repo files - #61

Open
bo0tzz wants to merge 1 commit into
vtuber-plan:mainfrom
bo0tzz:fix/canonical-repo-file-404
Open

fix: return upstream 4xx instead of 504 for canonical repo files#61
bo0tzz wants to merge 1 commit into
vtuber-plan:mainfrom
bo0tzz:fix/canonical-repo-file-404

Conversation

@bo0tzz

@bo0tzz bo0tzz commented Jul 13, 2026

Copy link
Copy Markdown

Canonical (no-org) repos like xlm-roberta-base were excluded from the paths-info metadata branch in _file_realtime_stream because of the "org is not None" guard, falling back to _remote_file_metadata which collapsed any upstream error into a ProxyTimeout 504. The HF paths-info API handles canonical names via a 307 redirect that the proxy already follows, so the guard can simply allow org=None.

Additionally, _remote_file_metadata now reports the upstream status code so genuine 404/401/403 responses pass through instead of being relabeled as 504; network failures still map to ProxyTimeout.

Canonical (no-org) repos like xlm-roberta-base were excluded from the
paths-info metadata branch in _file_realtime_stream because of the
"org is not None" guard, falling back to _remote_file_metadata which
collapsed any upstream error into a ProxyTimeout 504. The HF paths-info
API handles canonical names via a 307 redirect that the proxy already
follows, so the guard can simply allow org=None.

Additionally, _remote_file_metadata now reports the upstream status
code so genuine 404/401/403 responses pass through instead of being
relabeled as 504; network failures still map to ProxyTimeout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant