mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5083] [Other] Terminal: honor HF_ENDPOINT for DFlash2 downloads #5304
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5304
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/5083
Author: @zhgcao
Created: 11/3/2026
Status: 🔄 Open
Base:
main← Head:main📝 Commits (1)
ae146d3Terminal: honor HF_ENDPOINT for DFlash2 downloads📊 Changes
2 files changed (+29 additions, -1 deletions)
View changed files
📝
strata_control/drafting.py(+3 -1)📝
tests/terminal/test_drafting.py(+26 -0)📄 Description
Summary
Fix DFlash2 drafter downloads in the Strata Terminal so they respect the HF_ENDPOINT environment variable.
Previously, DFlash2 downloads used a hard-coded huggingface.co URL, preventing users who rely on Hugging Face mirrors from downloading the drafter through the Terminal.
Changes
Build the DFlash2 download URL using HF_ENDPOINT when set.
Preserve https://huggingface.co as the default when HF_ENDPOINT is unset or empty.
Add regression tests covering both custom endpoints and the default URL.
Motivation
Users in regions where direct access to Hugging Face is unreliable may configure a mirror, for example:
export HF_ENDPOINT=https://hf-mirror.com
The Terminal's DFlash2 downloader should honor this setting, just like other Hugging Face download workflows.
Testing
Added regression coverage for a custom HF_ENDPOINT, including a trailing slash.
Added regression coverage for the default Hugging Face endpoint when the environment variable is unset.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.