Repository navigation
Fix Hub download token boundary (clean replacement) - #7413
Imagineer99 wants to merge 2 commits into
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd61f0f195
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const preparedToken = await prepareHfTokenForUse(hfToken); | ||
| if (!preparedToken.proceed) { | ||
| throw new Error("Model load cancelled."); | ||
| } | ||
| hfToken = preparedToken.token; |
There was a problem hiding this comment.
Reuse the prepared token for GGUF metadata
When loading a GGUF whose diffusion status is not already known, this unconditional preparation validates the saved token, and performLoad immediately calls prepareHfTokenForUse again before fetchGgufStagedMetadata. For a valid token, every such load therefore makes two sequential /api/hub/token/validate requests, adding avoidable load latency and consuming validation rate limits; pass the already prepared hfToken into the metadata request instead of preparing it again.
Useful? React with 👍 / 👎.
Summary
Supersedes #7177 with the same request-scoped authentication fix on a clean, current-
mainhistory.X-Unsloth-HF-Tokentoken=Falsefor anonymous model, GGUF, dataset, formatting, seed, and dataset-card advisory callsWhy this replacement exists
The original branch still contains the reconcile-history merge. This replacement is the exact final #7177 patch transplanted onto current
main, without the unrelated ancestry.Validation
git diff --check