[PR #5083] [Other] Terminal: honor HF_ENDPOINT for DFlash2 downloads #5304

Open
opened 2026-11-07 16:34:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • ae146d3 Terminal: 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.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/5083 **Author:** [@zhgcao](https://github.com/zhgcao) **Created:** 11/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`ae146d3`](https://github.com/Niko1221/Strata/commit/ae146d3c5a936483de38d97ce80490f0214a2954) Terminal: honor HF_ENDPOINT for DFlash2 downloads ### 📊 Changes **2 files changed** (+29 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `strata_control/drafting.py` (+3 -1) 📝 `tests/terminal/test_drafting.py` (+26 -0) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#5304
No description provided.