[GH-ISSUE #4369] [GUI] Some Hugging Face download paths ignore HF_ENDPOINT and still target huggingface.co #1935

Closed
opened 2026-11-04 01:55:25 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @66666233336666623333 on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4369

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop host download code, inspected at v0.2.7 / commit 5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d.

What happened

I want to download model files through a directly reachable Hugging Face mirror. My high-speed proxy quota is limited, so unexpectedly using the official host for large downloads is a practical problem.

The main setup and MTP paths already honor HF_ENDPOINT (the support added for #495). However, the setting does not cover every Hugging Face downloader:

Expected: an explicitly configured HF_ENDPOINT should consistently determine the initial host used for Hugging Face model-file downloads, while preserving the pinned revision, file-size and hash checks.

Observed at component level: the image downloader still passes an official-host URL to its fetch function even when HF_ENDPOINT is set. Without an override, keeping the current official-host default is fine.

Smallest steps or command that reproduce it

I ran an offline probe against the unchanged download module on Windows with Node.js v24.19.0:

  1. Set HF_ENDPOINT=https://mirror.invalid and STRATA_SOURCE=huggingface. The reserved .invalid address is intentional; the probe does not use the network.
  2. Create createImageModels with fresh temporary state/model folders, real: true, and an injected fetcher that records its URL and immediately throws Probe stopped before network I/O.
  3. Call install('q4'), then await whenIdle().

Captured output:

configuredEndpoint: https://mirror.invalid
capturedUrl: https://huggingface.co/unsloth/Qwen-Image-2.1-Turbo-GGUF/resolve/5d1f9f759ea877ae556cda88dbec958b62ad3809/qwen-image-2.1-turbo-Q4_K_M.gguf

The reported error state is intentional because the stub stops before network I/O. No model bytes were downloaded.

Reproduction status

Reproduced locally at the downloader-component level with an intercepted fetch call.

Unconfirmed static analysis for the packaged Desktop flow: I have not reproduced this through the packaged UI or captured real outbound traffic. This report establishes the URL selected by the component, not a measured proxy-quota loss or a failure of the normal chat-model/MTP installer.

An additional coverage point found by reading the code is the explicit DFlash2 fetch helper: drafting.BASE_URL is also fixed to the official host, and drafting_fetch.py:76 uses it by default. I did not execute that download. The release sets ENGINE_SERVES_DFLASH2 = False, so I am not claiming it downloads automatically during normal Desktop serving.

Current workaround and requested improvement

A correctly configured proxy that covers the app and its child processes is a possible workaround for reaching the official host. However, it adds configuration and troubleshooting, and large downloads may consume limited high-speed proxy traffic. For users who can reach a mirror directly, consistently honoring one HF_ENDPOINT setting would be much simpler. Proxy configurations were not tested as part of this report.

Could the remaining Hugging Face download paths honor the same endpoint setting, with a small regression check for the initial URL passed to the downloader? Any intentional exceptions could be documented. This request concerns Strata's initial URL selection; redirects chosen by a mirror are a separate matter.

Strata version

Source: v0.2.7, commit 5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d (also the current main at inspection time).

Graphics card, memory and system

Windows host, Node.js v24.19.0. GPU, VRAM and model inference were not involved in the probe. No packaged-app or GPU compatibility claim is made.

  • #495: existing setup/MTP mirror support.
  • #4305: proxy handling and MTP retry behavior. This report concerns endpoint override coverage in other download paths.

Searched open and closed issues and pull requests for HF_ENDPOINT, hf-mirror, and image-models.mjs; I did not find a report specifically covering this remaining URL-selection issue.

Originally created by @66666233336666623333 on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/4369 ### Area [GUI] (the desktop app) ### Desktop app, Terminal or source? Desktop host download code, inspected at `v0.2.7` / commit `5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d`. ### What happened I want to download model files through a directly reachable Hugging Face mirror. My high-speed proxy quota is limited, so unexpectedly using the official host for large downloads is a practical problem. The main setup and MTP paths already honor `HF_ENDPOINT` (the support added for #495). However, the setting does not cover every Hugging Face downloader: - [`apps/host/server/image-models.mjs:45`](https://github.com/Niko1221/Strata/blob/5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d/apps/host/server/image-models.mjs#L45) constructs the image-model download URL with a literal `https://huggingface.co`. - [Lines 88–90](https://github.com/Niko1221/Strata/blob/5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d/apps/host/server/image-models.mjs#L88-L90) pass that URL directly to `fetcher`, without reading `HF_ENDPOINT`. - The host registers this handler at [`POST /api/image-models/:id/install`](https://github.com/Niko1221/Strata/blob/5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d/apps/host/server/index.mjs#L1455-L1464). **Expected:** an explicitly configured `HF_ENDPOINT` should consistently determine the initial host used for Hugging Face model-file downloads, while preserving the pinned revision, file-size and hash checks. **Observed at component level:** the image downloader still passes an official-host URL to its fetch function even when `HF_ENDPOINT` is set. Without an override, keeping the current official-host default is fine. ### Smallest steps or command that reproduce it I ran an offline probe against the unchanged download module on Windows with Node.js `v24.19.0`: 1. Set `HF_ENDPOINT=https://mirror.invalid` and `STRATA_SOURCE=huggingface`. The reserved `.invalid` address is intentional; the probe does not use the network. 2. Create `createImageModels` with fresh temporary state/model folders, `real: true`, and an injected `fetcher` that records its URL and immediately throws `Probe stopped before network I/O`. 3. Call `install('q4')`, then await `whenIdle()`. Captured output: ```text configuredEndpoint: https://mirror.invalid capturedUrl: https://huggingface.co/unsloth/Qwen-Image-2.1-Turbo-GGUF/resolve/5d1f9f759ea877ae556cda88dbec958b62ad3809/qwen-image-2.1-turbo-Q4_K_M.gguf ``` The reported error state is intentional because the stub stops before network I/O. No model bytes were downloaded. ### Reproduction status **Reproduced locally at the downloader-component level with an intercepted fetch call.** **Unconfirmed static analysis for the packaged Desktop flow:** I have not reproduced this through the packaged UI or captured real outbound traffic. This report establishes the URL selected by the component, not a measured proxy-quota loss or a failure of the normal chat-model/MTP installer. An additional coverage point found by reading the code is the explicit DFlash2 fetch helper: [`drafting.BASE_URL`](https://github.com/Niko1221/Strata/blob/5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d/strata_control/drafting.py#L85-L96) is also fixed to the official host, and [`drafting_fetch.py:76`](https://github.com/Niko1221/Strata/blob/5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d/strata_control/drafting_fetch.py#L76) uses it by default. I did not execute that download. The release sets `ENGINE_SERVES_DFLASH2 = False`, so I am not claiming it downloads automatically during normal Desktop serving. ### Current workaround and requested improvement A correctly configured proxy that covers the app and its child processes is a possible workaround for reaching the official host. However, it adds configuration and troubleshooting, and large downloads may consume limited high-speed proxy traffic. For users who can reach a mirror directly, consistently honoring one `HF_ENDPOINT` setting would be much simpler. Proxy configurations were not tested as part of this report. Could the remaining Hugging Face download paths honor the same endpoint setting, with a small regression check for the initial URL passed to the downloader? Any intentional exceptions could be documented. This request concerns Strata's initial URL selection; redirects chosen by a mirror are a separate matter. ### Strata version Source: `v0.2.7`, commit `5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d` (also the current `main` at inspection time). ### Graphics card, memory and system Windows host, Node.js `v24.19.0`. GPU, VRAM and model inference were not involved in the probe. No packaged-app or GPU compatibility claim is made. ### Related discussions - #495: existing setup/MTP mirror support. - #4305: proxy handling and MTP retry behavior. This report concerns endpoint override coverage in other download paths. Searched open and closed issues and pull requests for `HF_ENDPOINT`, `hf-mirror`, and `image-models.mjs`; I did not find a report specifically covering this remaining URL-selection issue.
Author
Owner

@Nyarlathoteppppp commented on GitHub (Oct 29, 2026):

I have a fix with a regression test that fails before and passes after; opening a PR shortly.

<!-- gh-comment-id:6486799794 --> @Nyarlathoteppppp commented on GitHub (Oct 29, 2026): I have a fix with a regression test that fails before and passes after; opening a PR shortly.
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6660321236 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#1935
No description provided.