Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

feat(models): OrcaRouters Qwen 3.8 27B Uncensored, und ein Hugging-Face-Token, den Downloads benutzen

Davidd6fc9dc95889
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c082039e..44d025cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,19 @@ engine has a name of its own, the LU Engine.
### Added
+- **OrcaRouter's Qwen 3.8 27B Uncensored, and a Hugging Face token that
+ model downloads use.** The six uncensored 27B rows in the Model Manager now
+ come from OrcaRouter's abliteration (bartowski's ungated GGUF requant of it,
+ vision projector included), and Ollama users get OrcaRouter's own tag with
+ the projector inside. OrcaRouter's original GGUF repo is gated on Hugging
+ Face and answers HTTP 401 to anyone without an accepted licence and a token.
+ A download that runs into that now says so and names the fix instead of
+ "trying again cannot help": accept the licence on the repo page, put a
+ Hugging Face token under Settings, AI Backends, Hugging Face token, and
+ start the download again. That field exists on Windows and Linux now (it
+ lived only inside the Mac media panel), and the token goes to
+ huggingface.co with every model download, which also lifts the throttle
+ the hub puts on anonymous downloads.
- **An effort control beside the Think button** on a reasoning model. Low,
Medium and High, with Max on GLM 5.3, set how many tokens a reply may spend
on thinking. The steps come from the server for each model, so a model that
diff --git a/README.md b/README.md
index d144ca51..2161e2bf 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ Grab the latest release from [**Releases**](https://github.com/PurpleDoubleD/loc
### What's new in 2.6.8
-The effort release. A reasoning model now has an effort control beside its Think button, Low, Medium and High with Max on GLM 5.3, and the steps come from the server for each model, so a model that offers none keeps the plain button it always had. GLM 5.3 (Pro) and GLM 5.3 Flash (Hosted) joined the cloud catalogue, and the cloud model list holds one fixed order, because the upstream provider shuffles its own list on every call and a new chat opened on whatever happened to be first. Document Chat works in Cloud mode, with your files indexed on your own machine and only the passages that match your question travelling with the prompt. The built-in engine goes by LU Engine now: it moves to a free port when 8127 is taken, retries once after a start that fails, and a chat model you downloaded stays visible as Installed with a Use button that starts the engine for it. A running LM Studio keeps its own heading in the picker, and one click hands the local slot back to it. Model Storage is read now, not only written to, so every GGUF up to four levels down shows up under Installed, and the three backends got three named rows instead of one field labelled auto-detect. The CivitAI API key has a field again. AMD on Windows is read from the HIP SDK, because the only ROCm probe ran rocm-smi and the Windows SDK does not ship it (#123); that one is researched rather than proven, since there is no RDNA4 card here. The Model Manager also stopped reading system RAM as video memory. AMD cards on Linux report their memory size without ROCm installed, because LU read that size only through rocm-smi, which comes with the ROCm developer packages rather than with the driver, so the card was found and its size was not; that reading has now been measured on a rented AMD Instinct MI325X, and on that card LU also lists it with its name and gfx target (a compute card reports itself as a processing accelerator rather than as graphics, so it used to be missing from the hardware list entirely), installs PyTorch from the ROCm channel it picks, and rendered an image, a video, a song, a 4x upscale and a cutout in Create. Also fixed: the deb and the rpm ask for libvulkan1 and libgomp1 instead of letting the engine die in the loader, the ComfyUI installer proves that the environment it just built can import ComfyUI and Repair can be cancelled, the Coding Agent's working directory can be removed again, the prompt history in Create can be cleared, the side panel folds away with your latest chats on the main screen, Settings shows the port the LU Engine really runs on, Windows error messages arrive in English, a ComfyUI that will not start names the cause instead of sending you into a repair that cannot fix it, every Python step LU starts runs with UTF-8 output so a Windows account name outside the English alphabet stops breaking the install partway through, German phrasing reaches the chat tools again now that the filler word "mal" no longer counts as the command to paint and the German words for the internet are on the list, and the Mac stopped scanning your whole home folder for a ComfyUI it never runs there, which is what made macOS ask for access to Apple Music and the Desktop at first launch. Character training on a Windows machine with more than one GPU no longer dies at the first step over a libuv that the Windows torch wheels do not carry (#121); LU sets USE_LIBUV=0 for every trainer process there, the documented torch workaround, since nobody here has two GPUs to measure it on.
+The effort release. A reasoning model now has an effort control beside its Think button, Low, Medium and High with Max on GLM 5.3, and the steps come from the server for each model, so a model that offers none keeps the plain button it always had. GLM 5.3 (Pro) and GLM 5.3 Flash (Hosted) joined the cloud catalogue, and the cloud model list holds one fixed order, because the upstream provider shuffles its own list on every call and a new chat opened on whatever happened to be first. Document Chat works in Cloud mode, with your files indexed on your own machine and only the passages that match your question travelling with the prompt. The built-in engine goes by LU Engine now: it moves to a free port when 8127 is taken, retries once after a start that fails, and a chat model you downloaded stays visible as Installed with a Use button that starts the engine for it. A running LM Studio keeps its own heading in the picker, and one click hands the local slot back to it. Model Storage is read now, not only written to, so every GGUF up to four levels down shows up under Installed, and the three backends got three named rows instead of one field labelled auto-detect. The CivitAI API key has a field again. AMD on Windows is read from the HIP SDK, because the only ROCm probe ran rocm-smi and the Windows SDK does not ship it (#123); that one is researched rather than proven, since there is no RDNA4 card here. The Model Manager also stopped reading system RAM as video memory. AMD cards on Linux report their memory size without ROCm installed, because LU read that size only through rocm-smi, which comes with the ROCm developer packages rather than with the driver, so the card was found and its size was not; that reading has now been measured on a rented AMD Instinct MI325X, and on that card LU also lists it with its name and gfx target (a compute card reports itself as a processing accelerator rather than as graphics, so it used to be missing from the hardware list entirely), installs PyTorch from the ROCm channel it picks, and rendered an image, a video, a song, a 4x upscale and a cutout in Create. Also fixed: the deb and the rpm ask for libvulkan1 and libgomp1 instead of letting the engine die in the loader, the ComfyUI installer proves that the environment it just built can import ComfyUI and Repair can be cancelled, the Coding Agent's working directory can be removed again, the prompt history in Create can be cleared, the side panel folds away with your latest chats on the main screen, Settings shows the port the LU Engine really runs on, Windows error messages arrive in English, a ComfyUI that will not start names the cause instead of sending you into a repair that cannot fix it, every Python step LU starts runs with UTF-8 output so a Windows account name outside the English alphabet stops breaking the install partway through, German phrasing reaches the chat tools again now that the filler word "mal" no longer counts as the command to paint and the German words for the internet are on the list, and the Mac stopped scanning your whole home folder for a ComfyUI it never runs there, which is what made macOS ask for access to Apple Music and the Desktop at first launch. Character training on a Windows machine with more than one GPU no longer dies at the first step over a libuv that the Windows torch wheels do not carry (#121); LU sets USE_LIBUV=0 for every trainer process there, the documented torch workaround, since nobody here has two GPUs to measure it on. The uncensored Qwen 3.8 27B rows in the Model Manager come from OrcaRouter's abliteration now, with OrcaRouter's own Ollama tag beside them, and a gated Hugging Face repo no longer ends in "trying again cannot help": the download says the repo needs an accepted licence and a Hugging Face token, and the token field exists on Windows and Linux too.
### What's new in 2.6.7
diff --git a/e2e/mac-create-mlx.spec.ts b/e2e/mac-create-mlx.spec.ts
index ecd63661..a571205c 100644
--- a/e2e/mac-create-mlx.spec.ts
+++ b/e2e/mac-create-mlx.spec.ts
@@ -210,9 +210,11 @@ test('mac: saving the HuggingFace token in Settings pushes it to Rust', async ({
await page.getByRole('button', { name: /^Settings$/ }).click()
await page.getByRole('button', { name: /AI Backends/i }).click()
- await page.getByRole('button', { name: /Local Media \(Apple MLX\)/i }).click()
+ // 2.6.8: the field left the Mac media panel for a section of its own that
+ // every platform has, because the GGUF downloader sends the token now too.
+ await page.getByRole('button', { name: 'Hugging Face token', exact: true }).click()
- await page.getByLabel('HuggingFace token').fill('hf_e2e_probe')
+ await page.getByLabel('Hugging Face token').fill('hf_e2e_probe')
await page.getByRole('button', { name: /^Save$/ }).click()
await expect(page.getByRole('button', { name: /Saved/i })).toBeVisible({ timeout: 10_000 })
diff --git a/src-tauri/src/commands/download.rs b/src-tauri/src/commands/download.rs
index ebcef30c..99302e24 100644
--- a/src-tauri/src/commands/download.rs
+++ b/src-tauri/src/commands/download.rs
@@ -213,10 +213,50 @@ mod civitai_auth_tests {
/// Negative control: every other host and every other status is answered
/// by `http_error_message` word for word. A dead HuggingFace link must not
/// send people to the CivitAI setting.
+ /// A gated hub repo is a missing credential, not a dead address.
+ /// OrcaRouter's own GGUF repo answers 401 to everyone without a token
+ /// (measured 2026-09-05); the old text said "trying again cannot help".
+ #[test]
+ fn a_refused_huggingface_download_names_the_token_field_and_keeps_retry() {
+ for status in [401u16, 403] {
+ let msg = download_http_error(
+ "https://huggingface.co/orcarouter/Qwen3.8-27B-Uncensored-GGUF/resolve/main/m.gguf",
+ status,
+ false,
+ "m.gguf",
+ );
+ assert!(msg.contains(&format!("HTTP {status}")), "{msg}");
+ assert!(msg.contains("Settings > AI Backends > Hugging Face token"), "{msg}");
+ assert!(msg.contains("accept its licence"), "{msg}");
+ assert!(!msg.contains(&format!("(HTTP {status})")), "{msg}");
+ assert!(!msg.contains("cannot help"), "{msg}");
+ }
+ let sent = download_http_error("https://hf.co/x/y/resolve/main/m.gguf", 401, true, "m.gguf");
+ assert!(sent.contains("was sent and rejected"), "{sent}");
+ assert!(!sent.contains("add a Hugging Face token"), "{sent}");
+ // A 404 on the hub is still a dead address, brackets and all.
+ let gone = download_http_error("https://huggingface.co/x/y/resolve/main/m.gguf", 404, false, "m.gguf");
+ assert_eq!(gone, http_error_message(404, "m.gguf"));
+ }
+
+ #[test]
+ fn the_hub_host_rule_is_as_strict_as_the_civitai_one() {
+ assert!(super::is_huggingface_host("https://huggingface.co/a/b/resolve/main/m.gguf"));
+ assert!(super::is_huggingface_host("https://HF.co/a/b/resolve/main/m.gguf"));
+ assert!(super::is_huggingface_host("https://cdn-lfs.huggingface.co/x"));
+ assert!(!super::is_huggingface_host("https://huggingface.co.evil.test/x"));
+ assert!(!super::is_huggingface_host("https://evil.test/huggingface.co/x"));
+ // The backslash ends the host in a special scheme: reqwest talks to
+ // evil.test here, so the token must not go out.
+ assert!(!super::is_huggingface_host("https://evil.test\\.huggingface.co/x"));
+ assert!(!super::is_huggingface_host("not a url"));
+ }
+
#[test]
fn other_hosts_and_other_statuses_get_no_civitai_hint() {
for (url, status, sent) in [
- ("https://huggingface.co/repo/resolve/main/m.gguf", 401u16, false),
+ ("https://huggingface.co/repo/resolve/main/m.gguf", 404u16, false),
+ ("https://example.test/repo/m.gguf", 401, false),
("https://civitai.com/api/download/models/1", 404, false),
("https://civitai.com/api/download/models/1", 500, true),
] {
@@ -742,7 +782,7 @@ pub fn http_error_message(status: u16, filename: &str) -> String {
"{filename} is not at this address any more (HTTP {status}). The repository was renamed, moved or taken down, so trying again cannot help. Look for a newer version of this model in the Model Manager, or update Locally Uncensored — the address is part of the app's catalog."
),
401 | 403 => format!(
- "{filename} cannot be downloaded without a HuggingFace login (HTTP {status}). This repository is gated or private: open its page in a browser, accept the licence with your HuggingFace account, and put the file into the model folder by hand. Trying again here cannot help."
+ "{filename} cannot be downloaded without a login at this host (HTTP {status}). The address is gated or private: open it in a browser, sign in, accept any licence, and put the file into the model folder by hand. Trying again here cannot help."
),
429 => format!(
"The host is rate limiting this download (HTTP {status}). Wait a few minutes, then start {filename} again."
@@ -818,6 +858,16 @@ pub(crate) fn is_civitai_host(url: &str) -> bool {
|| host.ends_with(".civitai.red")
}
+/// Same rule for the Hugging Face hub, the only host the stored Hugging Face
+/// token is ever sent to. `hf.co` is the hub's own short alias.
+pub(crate) fn is_huggingface_host(url: &str) -> bool {
+ let host = match url::Url::parse(url) {
+ Ok(u) => u.host_str().unwrap_or("").to_ascii_lowercase(),
+ Err(_) => return false,
+ };
+ host == "huggingface.co" || host == "hf.co" || host.ends_with(".huggingface.co")
+}
+
/// What the user reads when a download comes back refused.
///
/// goonerforporn, Discord #bug-reports 2026-08-28: CivitAI downloads ended in a
@@ -833,6 +883,26 @@ pub(crate) fn is_civitai_host(url: &str) -> bool {
/// key is the one refusal the user can go and fix, so the button has to stay.
pub(crate) fn download_http_error(url: &str, status: u16, sent_token: bool, filename: &str) -> String {
let refused = matches!(status, 400 | 401 | 403);
+ // A gated Hugging Face repo (OrcaRouter's own GGUF repo is one) answers
+ // 401 to everyone without an accepted licence and a token. That is not a
+ // dead address, it is a missing credential, so the text names the field
+ // and keeps the status out of the `(HTTP nnn)` shape: the Retry button
+ // has to stay for the moment the token is in.
+ if is_huggingface_host(url) && matches!(status, 401 | 403) {
+ return if sent_token {
+ format!(
+ "Hugging Face refused this download with HTTP {status}. Your Hugging Face token was sent and rejected. \
+ Check it under Settings > AI Backends > Hugging Face token, and check that you accepted this \
+ repository's licence on huggingface.co with the same account."
+ )
+ } else {
+ format!(
+ "Hugging Face refused this download with HTTP {status}. This repository is gated or private and needs a \
+ Hugging Face account: open the repository page on huggingface.co, accept its licence, add a Hugging Face \
+ token under Settings > AI Backends > Hugging Face token, then start {filename} again."
+ )
+ };
+ }
if is_civitai_host(url) && refused {
return if sent_token {
format!(
@@ -986,10 +1056,15 @@ async fn do_download(
// the host, which is exactly right: CivitAI hands the file to a signed CDN
// URL that must not see the key.
let civitai = is_civitai_host(url);
- // as_deref, damit der Griff kopierbar bleibt: weiter unten fragt die
- // Fehlermeldung noch einmal, ob ein Schluessel mitgegangen ist.
- let sent_token = auth_token.as_deref().filter(|t| !t.trim().is_empty() && civitai);
- if let Some(t) = sent_token {
+ let civitai_key = auth_token.as_deref().filter(|t| !t.trim().is_empty() && civitai);
+ // The Hugging Face token from Settings goes to the hub and to no other
+ // host: gated repos answer 401 without it, and anonymous hub traffic is
+ // throttled. Same redirect rule as above, the signed CDN URL never sees it.
+ let hf_token = if is_huggingface_host(url) { crate::commands::mlx::hf_token() } else { None };
+ // Kept as a value: weiter unten fragt die Fehlermeldung noch einmal, ob
+ // ein Schluessel mitgegangen ist.
+ let sent_token: Option<String> = civitai_key.map(|t| t.trim().to_string()).or(hf_token);
+ if let Some(t) = sent_token.as_deref() {
request = request.bearer_auth(t.trim());
}
diff --git a/src-tauri/src/commands/mlx.rs b/src-tauri/src/commands/mlx.rs
index f8d9518a..0f4b5819 100644
--- a/src-tauri/src/commands/mlx.rs
+++ b/src-tauri/src/commands/mlx.rs
@@ -58,12 +58,18 @@ static HF_TOKEN: std::sync::RwLock<Option<String>> = std::sync::RwLock::new(None
/// of reach entirely without a token. HF_HOME stays with the caller: the image
/// lane shares one cache, the video lane downloads into per-model directories.
pub(crate) fn apply_hf_token(cmd: &mut Command) {
- let token = HF_TOKEN.read().ok().and_then(|t| t.clone());
- if let Some(t) = token {
+ if let Some(t) = hf_token() {
cmd.env("HF_TOKEN", t);
}
}
+/// The stored token, for the one other place that talks to the hub directly:
+/// the GGUF downloader in `download.rs`, which sends it as a Bearer header to
+/// huggingface.co and nowhere else.
+pub(crate) fn hf_token() -> Option<String> {
+ HF_TOKEN.read().ok().and_then(|t| t.clone())
+}
+
/// Store the token from Settings. An empty string clears it, because that is
/// how the user removes the token again; it must not be stored as `Some("")`.
pub fn set_hf_token(_state: &AppState, args: &Value) -> CmdResult {
diff --git a/src/api/__tests__/discover-registry.test.ts b/src/api/__tests__/discover-registry.test.ts
index 5036c15c..82827e96 100644
--- a/src/api/__tests__/discover-registry.test.ts
+++ b/src/api/__tests__/discover-registry.test.ts
@@ -485,6 +485,15 @@ describe('discover — data validation', () => {
expect(groups).toContain('Qwen 3.8 27B Abliterated')
})
+ it('serves OrcaRouter\'s uncensored 27B from the ungated bartowski requant, projector named as that repo names it', () => {
+ const rows = getUncensoredTextModels().filter(m => m.group === 'Qwen 3.8 27B Uncensored')
+ expect(rows.length).toBe(6)
+ for (const m of rows) {
+ expect(m.downloadUrl).toContain('/bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF/')
+ expect(m.mmprojUrl).toContain('/bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF/resolve/main/mmproj-orcarouter_Qwen3.8-27B-Uncensored-f16.gguf')
+ }
+ })
+
it('lists the official 27B and the small distill', () => {
const names = getMainstreamTextModels().map(m => m.name)
expect(names).toContain('Qwen 3.8 27B')
@@ -497,6 +506,7 @@ describe('discover — data validation', () => {
.filter(Boolean)
expect(tags).toContain('qwen3.8')
expect(tags).toContain('huihui_ai/Qwen3.8-abliterated:27b')
+ expect(tags).toContain('orcarouter/Qwen3.8-27B-Uncensored:q4_K_M')
})
})
})
diff --git a/src/api/discover.ts b/src/api/discover.ts
index 4b49e727..ef9360a1 100644
--- a/src/api/discover.ts
+++ b/src/api/discover.ts
@@ -947,7 +947,7 @@ const HF = (repo: string, file: string) => `https://huggingface.co/${repo}/resol
* Derived, never hand-written in the catalog, because the built-in engine has
* to find the projector from the model path alone (src-tauri engine.rs mirrors
* this exact rule). The upstream repos disagree on naming (`mmproj-F16.gguf`,
- * `mmproj-model-bf16.gguf`, `mmproj-Qwen3.8-27B-Uncensored-F16.gguf`), and the
+ * `mmproj-model-bf16.gguf`, `mmproj-Qwen3.8-27B-Uncensored-f16.gguf`), and the
* built-in models dir is FLAT, so keeping the upstream name would leave two
* models fighting over one projector file. Tying the name to the model also
* keeps the pairing right when a user downloads several quants of one model.
@@ -1040,14 +1040,23 @@ export function getUncensoredTextModels(): DiscoverModel[] {
// vision-language models, so every entry carries the repo's own mmproj and
// LU downloads it with the model (see `mmprojFileName`). The MTP head that
// ships inside these GGUFs loads fine on the pinned llama.cpp b9949, which
- // implements the qwen35 MTP block, so we point at the plain files and not
- // at JonathanColetti's noMTP cut.
- { name: 'Qwen 3.8 27B Uncensored', group: 'Qwen 3.8 27B Uncensored', description: 'Qwen 3.8 27B dense · the viral uncensored build. Vision + thinking, 262K context. Recommended quant. The 0.9 GB vision projector comes with it.', pulls: '1M+', tags: ['27B', 'Vision', 'Q4_K_M', '17 GB'], updated: 'Hot', agent: true, released: '2026-08', downloadUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'Qwen3.8-27B-Uncensored-Q4_K_M.gguf'), filename: 'Qwen3.8-27B-Uncensored-Q4_K_M.gguf', sizeGB: 16.8, mmprojUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'mmproj-Qwen3.8-27B-Uncensored-F16.gguf'), mmprojSizeGB: 0.93 },
- { name: 'Qwen 3.8 27B Uncensored IQ2_M', group: 'Qwen 3.8 27B Uncensored', description: 'Qwen 3.8 27B uncensored · smallest quant, fits a 12 GB card. Real quality tradeoff, but it runs.', pulls: '1M+', tags: ['27B', 'Vision', 'IQ2_M', '11 GB'], updated: 'Hot', agent: true, released: '2026-08', downloadUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'Qwen3.8-27B-Uncensored-IQ2_M.gguf'), filename: 'Qwen3.8-27B-Uncensored-IQ2_M.gguf', sizeGB: 10.6, mmprojUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'mmproj-Qwen3.8-27B-Uncensored-F16.gguf'), mmprojSizeGB: 0.93 },
- { name: 'Qwen 3.8 27B Uncensored IQ4_XS', group: 'Qwen 3.8 27B Uncensored', description: 'Qwen 3.8 27B uncensored · IQ4_XS, the cheapest 4 bit. Close to Q4_K_M on 16 GB cards.', pulls: '1M+', tags: ['27B', 'Vision', 'IQ4_XS', '15 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'Qwen3.8-27B-Uncensored-IQ4_XS.gguf'), filename: 'Qwen3.8-27B-Uncensored-IQ4_XS.gguf', sizeGB: 15.3, mmprojUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'mmproj-Qwen3.8-27B-Uncensored-F16.gguf'), mmprojSizeGB: 0.93 },
- { name: 'Qwen 3.8 27B Uncensored Q5_K_M', group: 'Qwen 3.8 27B Uncensored', description: 'Qwen 3.8 27B uncensored · Q5, higher quality. For 24 GB cards.', pulls: '1M+', tags: ['27B', 'Vision', 'Q5_K_M', '20 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'Qwen3.8-27B-Uncensored-Q5_K_M.gguf'), filename: 'Qwen3.8-27B-Uncensored-Q5_K_M.gguf', sizeGB: 19.5, mmprojUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'mmproj-Qwen3.8-27B-Uncensored-F16.gguf'), mmprojSizeGB: 0.93 },
- { name: 'Qwen 3.8 27B Uncensored Q6_K', group: 'Qwen 3.8 27B Uncensored', description: 'Qwen 3.8 27B uncensored · Q6, near-lossless. High-VRAM setups.', pulls: '1M+', tags: ['27B', 'Vision', 'Q6_K', '22 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'Qwen3.8-27B-Uncensored-Q6_K.gguf'), filename: 'Qwen3.8-27B-Uncensored-Q6_K.gguf', sizeGB: 22.4, mmprojUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'mmproj-Qwen3.8-27B-Uncensored-F16.gguf'), mmprojSizeGB: 0.93 },
- { name: 'Qwen 3.8 27B Uncensored Q8_0', group: 'Qwen 3.8 27B Uncensored', description: 'Qwen 3.8 27B uncensored · Q8, full quality. 32 GB+ or CPU with lots of RAM.', pulls: '1M+', tags: ['27B', 'Vision', 'Q8_0', '29 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'Qwen3.8-27B-Uncensored-Q8_0.gguf'), filename: 'Qwen3.8-27B-Uncensored-Q8_0.gguf', sizeGB: 29, mmprojUrl: HF('JonathanColetti/Qwen3.8-27B-Uncensored-GGUF', 'mmproj-Qwen3.8-27B-Uncensored-F16.gguf'), mmprojSizeGB: 0.93 },
+ // implements the qwen35 MTP block, so we point at the plain files.
+ //
+ // The uncensored build is OrcaRouter's abliteration. Its own GGUF repo
+ // (orcarouter/Qwen3.8-27B-Uncensored-GGUF) is gated: every file answers
+ // HTTP 401 without a logged-in, terms-accepted account, which LU's
+ // downloader does not have, so pointing there would fail after the click.
+ // The rows use bartowski's requant of the same weights (base_model =
+ // orcarouter/Qwen3.8-27B-Uncensored, ungated, HEAD 200 on 2026-09-05);
+ // the entries used to point at JonathanColetti's requant. One HF row
+ // serves both the built-in engine and LM Studio (the downloader writes
+ // into whichever folder is active); Ollama gets the author's own tag.
+ { name: 'Qwen 3.8 27B Uncensored', group: 'Qwen 3.8 27B Uncensored', description: 'OrcaRouter Qwen 3.8 27B uncensored · the viral abliterated build, from the author\'s own repo. Vision + thinking + tools, 262K context. Recommended quant. The 0.9 GB vision projector comes with it.', pulls: '35K+', tags: ['27B', 'Vision', 'Q4_K_M', '18 GB'], updated: 'Hot', agent: true, released: '2026-08', downloadUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'orcarouter_Qwen3.8-27B-Uncensored-Q4_K_M.gguf'), filename: 'orcarouter_Qwen3.8-27B-Uncensored-Q4_K_M.gguf', sizeGB: 17.8, mmprojUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'mmproj-orcarouter_Qwen3.8-27B-Uncensored-f16.gguf'), mmprojSizeGB: 0.93 },
+ { name: 'Qwen 3.8 27B Uncensored IQ2_M', group: 'Qwen 3.8 27B Uncensored', description: 'OrcaRouter Qwen 3.8 27B uncensored · smallest quant, fits a 12 GB card. Real quality tradeoff, but it runs.', pulls: '35K+', tags: ['27B', 'Vision', 'IQ2_M', '11 GB'], updated: 'Hot', agent: true, released: '2026-08', downloadUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'orcarouter_Qwen3.8-27B-Uncensored-IQ2_M.gguf'), filename: 'orcarouter_Qwen3.8-27B-Uncensored-IQ2_M.gguf', sizeGB: 10.9, mmprojUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'mmproj-orcarouter_Qwen3.8-27B-Uncensored-f16.gguf'), mmprojSizeGB: 0.93 },
+ { name: 'Qwen 3.8 27B Uncensored IQ4_XS', group: 'Qwen 3.8 27B Uncensored', description: 'OrcaRouter Qwen 3.8 27B uncensored · IQ4_XS, the cheapest 4 bit. Close to Q4_K_M on 16 GB cards.', pulls: '35K+', tags: ['27B', 'Vision', 'IQ4_XS', '16 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'orcarouter_Qwen3.8-27B-Uncensored-IQ4_XS.gguf'), filename: 'orcarouter_Qwen3.8-27B-Uncensored-IQ4_XS.gguf', sizeGB: 15.6, mmprojUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'mmproj-orcarouter_Qwen3.8-27B-Uncensored-f16.gguf'), mmprojSizeGB: 0.93 },
+ { name: 'Qwen 3.8 27B Uncensored Q5_K_M', group: 'Qwen 3.8 27B Uncensored', description: 'OrcaRouter Qwen 3.8 27B uncensored · Q5, higher quality. For 24 GB cards.', pulls: '35K+', tags: ['27B', 'Vision', 'Q5_K_M', '21 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'orcarouter_Qwen3.8-27B-Uncensored-Q5_K_M.gguf'), filename: 'orcarouter_Qwen3.8-27B-Uncensored-Q5_K_M.gguf', sizeGB: 20.8, mmprojUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'mmproj-orcarouter_Qwen3.8-27B-Uncensored-f16.gguf'), mmprojSizeGB: 0.93 },
+ { name: 'Qwen 3.8 27B Uncensored Q6_K', group: 'Qwen 3.8 27B Uncensored', description: 'OrcaRouter Qwen 3.8 27B uncensored · Q6, near-lossless. High-VRAM setups.', pulls: '35K+', tags: ['27B', 'Vision', 'Q6_K', '23 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'orcarouter_Qwen3.8-27B-Uncensored-Q6_K.gguf'), filename: 'orcarouter_Qwen3.8-27B-Uncensored-Q6_K.gguf', sizeGB: 23.5, mmprojUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'mmproj-orcarouter_Qwen3.8-27B-Uncensored-f16.gguf'), mmprojSizeGB: 0.93 },
+ { name: 'Qwen 3.8 27B Uncensored Q8_0', group: 'Qwen 3.8 27B Uncensored', description: 'OrcaRouter Qwen 3.8 27B uncensored · Q8, full quality. 32 GB+ or CPU with lots of RAM.', pulls: '35K+', tags: ['27B', 'Vision', 'Q8_0', '29 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'orcarouter_Qwen3.8-27B-Uncensored-Q8_0.gguf'), filename: 'orcarouter_Qwen3.8-27B-Uncensored-Q8_0.gguf', sizeGB: 29.1, mmprojUrl: HF('bartowski/orcarouter_Qwen3.8-27B-Uncensored-GGUF', 'mmproj-orcarouter_Qwen3.8-27B-Uncensored-f16.gguf'), mmprojSizeGB: 0.93 },
{ name: 'Qwen 3.8 27B Abliterated', group: 'Qwen 3.8 27B Abliterated', description: 'huihui Qwen 3.8 27B abliterated · clean uncensor of the newest Qwen dense model. Vision + thinking. Note the quant is called Q4_K, not Q4_K_M.', pulls: '635K+', tags: ['27B', 'Vision', 'Q4_K', '17 GB'], updated: 'Hot', agent: true, released: '2026-08', downloadUrl: HF('huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF', 'Huihui-Qwen3.8-27B-abliterated-Q4_K.gguf'), filename: 'Huihui-Qwen3.8-27B-abliterated-Q4_K.gguf', sizeGB: 16.8, mmprojUrl: HF('huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF', 'mmproj-model-bf16.gguf'), mmprojSizeGB: 0.93 },
{ name: 'Qwen 3.8 27B Abliterated Q2_K', group: 'Qwen 3.8 27B Abliterated', description: 'huihui Qwen 3.8 27B abliterated · smallest quant for 12 GB cards.', pulls: '635K+', tags: ['27B', 'Vision', 'Q2_K', '11 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF', 'Huihui-Qwen3.8-27B-abliterated-Q2_K.gguf'), filename: 'Huihui-Qwen3.8-27B-abliterated-Q2_K.gguf', sizeGB: 10.9, mmprojUrl: HF('huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF', 'mmproj-model-bf16.gguf'), mmprojSizeGB: 0.93 },
{ name: 'Qwen 3.8 27B Abliterated Q5_K', group: 'Qwen 3.8 27B Abliterated', description: 'huihui Qwen 3.8 27B abliterated · Q5, higher quality. For 24 GB cards.', pulls: '635K+', tags: ['27B', 'Vision', 'Q5_K', '20 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF', 'Huihui-Qwen3.8-27B-abliterated-Q5_K.gguf'), filename: 'Huihui-Qwen3.8-27B-abliterated-Q5_K.gguf', sizeGB: 19.5, mmprojUrl: HF('huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF', 'mmproj-model-bf16.gguf'), mmprojSizeGB: 0.93 },
@@ -1055,6 +1064,7 @@ export function getUncensoredTextModels(): DiscoverModel[] {
{ name: 'Qwen 3.8 27B Abliterated Q8_0', group: 'Qwen 3.8 27B Abliterated', description: 'huihui Qwen 3.8 27B abliterated · Q8, full quality.', pulls: '635K+', tags: ['27B', 'Vision', 'Q8_0', '29 GB'], updated: 'New', agent: true, released: '2026-08', downloadUrl: HF('huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF', 'Huihui-Qwen3.8-27B-abliterated-Q8_0.gguf'), filename: 'Huihui-Qwen3.8-27B-abliterated-Q8_0.gguf', sizeGB: 29, mmprojUrl: HF('huihui-ai/Huihui-Qwen3.8-27B-abliterated-GGUF', 'mmproj-model-bf16.gguf'), mmprojSizeGB: 0.93 },
// Ollama ships the projector as a layer of the tag, so vision works there
// without a second file.
+ { name: 'Qwen 3.8 27B Uncensored (Ollama)', description: 'OrcaRouter Qwen 3.8 27B uncensored · one-command pull, projector included. Vision + tools + thinking out of the box. Needs Ollama 0.17.1 or newer.', pulls: '137K+', tags: ['27B', 'Vision', 'Tools', '18 GB'], updated: 'Hot', agent: true, released: '2026-08', ollamaModel: 'orcarouter/Qwen3.8-27B-Uncensored:q4_K_M', sizeGB: 18 },
{ name: 'Qwen 3.8 27B Abliterated (Ollama)', description: 'huihui Qwen 3.8 27B abliterated · one-command pull, projector included. Vision + tools + thinking out of the box.', pulls: '24K+', tags: ['27B', 'Vision', 'Tools', '18 GB'], updated: 'Hot', agent: true, released: '2026-08', ollamaModel: 'huihui_ai/Qwen3.8-abliterated:27b', sizeGB: 17.7 },
// ── HOT: Qwen 3.6 Unfiltered (April 2026) ──
{ name: 'Qwen 3.6 27B Samantha Unfiltered', description: 'Qwen 3.6 27B dense · Samantha personality, unfiltered finetune. Released April 22 2026. Needs GGUF conversion (see HF).', pulls: 'New', tags: ['27B', 'Vision', 'Unfiltered', '50 GB'], updated: 'Hot', agent: true, released: '2026-04', url: 'https://huggingface.co/cloudbjorn/Qwen3.6-27B_Samantha-Uncensored', canPull: false, sizeGB: 50 },
diff --git a/src/components/models/__tests__/das-raster-zaehlt-seine-knoten.test.ts b/src/components/models/__tests__/das-raster-zaehlt-seine-knoten.test.ts
index b54abafa..d0a8c9f5 100644
--- a/src/components/models/__tests__/das-raster-zaehlt-seine-knoten.test.ts
+++ b/src/components/models/__tests__/das-raster-zaehlt-seine-knoten.test.ts
@@ -126,7 +126,13 @@ describe('D-S26 · was das Raster wirklich kostet', () => {
// liegt weiterhin am unteren Ende. Neu zu messen waere bei einem Sprung
// in die Hunderter noetig.
expect(messeReiter(getMainstreamTextModels()).kacheln).toBe(53)
- expect(messeReiter(getUncensoredTextModels()).kacheln).toBe(56)
+ //
+ // 56 -> 57 am 05.09.2026, vierte Bewegung. David: „orcarouter ist ein
+ // muss." Die sechs Qwen-3.8-27B-Uncensored-Quants zeigen jetzt auf
+ // bartowskis ungated Requant von OrcaRouters Abliteration (gleiche Gruppe,
+ // keine neue Kachel), und dazu kommt OrcaRouters eigener Ollama-Tag, eine
+ // Kachel fuer sich, weil Ollama-Zeilen keine Gruppe tragen.
+ expect(messeReiter(getUncensoredTextModels()).kacheln).toBe(57)
})
it('eine Kachel ist rund 28 Elementknoten gross, nicht 300', () => {
diff --git a/src/components/settings/HfTokenSetting.tsx b/src/components/settings/HfTokenSetting.tsx
new file mode 100644
index 00000000..0f4e5280
--- /dev/null
+++ b/src/components/settings/HfTokenSetting.tsx
@@ -0,0 +1,104 @@
+/**
+ * The Hugging Face token field, on every platform.
+ *
+ * It used to live only inside the Apple MLX media panel, so a Windows or Linux
+ * user had no place to put a token at all. Meanwhile the GGUF downloader in
+ * src-tauri/src/commands/download.rs sent none, and a gated repository
+ * (OrcaRouter's own Qwen 3.8 27B Uncensored GGUF repo answers HTTP 401 to
+ * everyone without an accepted licence) ended in "trying again cannot help".
+ * Now the token is sent to huggingface.co on every model download, the 401
+ * text names this field, and this field exists wherever the app runs.
+ *
+ * Masked, like the CivitAI key next to it: a settings page is a screen people
+ * paste into support threads. The keychain is the store of record; Rust holds
+ * the token in memory only, so saving pushes it down at once and
+ * lib/rust-boot-sync pushes it again on every start.
+ */
+import { useEffect, useState } from 'react'
+import { KeyRound, Check } from 'lucide-react'
+import { secretGet, secretSet, openExternal } from '../../api/backend'
+import { applyHfToken, HF_TOKEN_ACCOUNT } from '../../api/mlx-image'
+
+/** Where Hugging Face issues tokens. A read token is enough. */
+export const HF_TOKEN_PAGE = 'https://huggingface.co/settings/tokens'
+
+export function HfTokenSetting() {
+ const [draft, setDraft] = useState('')
+ const [stored, setStored] = useState(false)
+ const [saved, setSaved] = useState(false)
+ const [error, setError] = useState<string | null>(null)
+
+ useEffect(() => {
+ void (async () => {
+ const value = await secretGet(HF_TOKEN_ACCOUNT).catch(() => null)
+ if (!value) return
+ setDraft(value)
+ setStored(true)
+ })()
+ }, [])
+
+ async function commit(value: string) {
+ setError(null)
+ try {
+ await secretSet(HF_TOKEN_ACCOUNT, value)
+ await applyHfToken(value)
+ setDraft(value)
+ setStored(value.length > 0)
+ setSaved(value.length > 0)
+ } catch (e) {
+ setError(e instanceof Error ? e.message : String(e))
+ }
+ }
+
+ return (
+ <div className="space-y-2 py-1">
+ <div className="flex items-center gap-1.5">
+ <KeyRound size={12} className="text-gray-500" />
+ <span className="t-micro text-gray-800 dark:text-gray-200">Hugging Face token</span>
+ <span className="t-micro text-gray-500">optional</span>
+ </div>
+ <div className="t-micro text-gray-500 leading-relaxed">
+ Sent to huggingface.co with every model download, and nowhere else. Without it downloads go out
+ anonymous, which the hub throttles, and a gated repository (one whose licence you have to accept
+ on its page) refuses the download with HTTP 401. A free read token is enough. It goes into your
+ system credential store where the OS has one and stays on this machine.
+ </div>
+ <div className="flex items-center gap-2">
+ <input
+ type="password"
+ value={draft}
+ onChange={(e) => { setDraft(e.target.value); setSaved(false) }}
+ placeholder="hf_..."
+ spellCheck={false}
+ autoComplete="off"
+ aria-label="Hugging Face token"
+ className="flex-1 min-w-0 px-2 py-1 rounded bg-transparent border border-white/8 t-micro text-gray-700 dark:text-gray-300 font-mono focus:outline-none focus:border-white/20"
+ />
+ <button
+ onClick={() => { void commit(draft.trim()) }}
+ className="px-2.5 py-1 rounded-md t-micro font-medium inline-flex items-center gap-1 bg-white dark:bg-white/10 text-gray-800 dark:text-white hover:bg-gray-100 dark:hover:bg-white/15 border border-gray-200 dark:border-white/15 transition-colors"
+ >
+ {saved && <Check size={11} />}
+ {saved ? 'Saved' : 'Save'}
+ </button>
+ {stored && (
+ <button
+ onClick={() => { void commit('') }}
+ className="px-2.5 py-1 rounded-md t-micro text-gray-500 hover:text-red-400 transition-colors"
+ >
+ Remove
+ </button>
+ )}
+ </div>
+ {error && (
+ <div role="alert" className="t-micro text-red-400">{error}</div>
+ )}
+ <button
+ onClick={() => { void openExternal(HF_TOKEN_PAGE) }}
+ className="t-micro text-purple-500 hover:text-purple-400 transition-colors"
+ >
+ Get a Hugging Face token
+ </button>
+ </div>
+ )
+}
diff --git a/src/components/settings/MlxMediaSettings.tsx b/src/components/settings/MlxMediaSettings.tsx
index 31a59ba6..06f9fdb7 100644
--- a/src/components/settings/MlxMediaSettings.tsx
+++ b/src/components/settings/MlxMediaSettings.tsx
@@ -10,7 +10,7 @@
// while something runs instead of holding progress in React.
import { useCallback, useEffect, useRef, useState } from 'react'
-import { Cpu, Download, Trash2, Loader2, Check, AlertTriangle, Film, Image as ImageIcon, KeyRound } from 'lucide-react'
+import { Cpu, Download, Trash2, Loader2, Check, AlertTriangle, Film, Image as ImageIcon } from 'lucide-react'
import {
mlxStatus,
listMlxImageModels,
@@ -19,12 +19,9 @@ import {
deleteMlxImageModel,
installMlxImageEngine,
getMlxImageEngineStatus,
- applyHfToken,
- HF_TOKEN_ACCOUNT,
type MlxStatus,
type MlxImageModel,
} from '../../api/mlx-image'
-import { secretGet, secretSet } from '../../api/backend'
import {
getVideoStatus,
listVideoModels,
@@ -78,14 +75,11 @@ export function MlxMediaSettings({ only }: { only?: 'image' | 'video' } = {}) {
const [progress, setProgress] = useState<string | null>(null)
const [error, setError] = useState<string | null>(null)
const [confirmDelete, setConfirmDelete] = useState<string | null>(null)
- const [hfToken, setHfToken] = useState('')
- const [hfSaving, setHfSaving] = useState(false)
- const [hfSaved, setHfSaved] = useState(false)
// Keep the latest busy kind readable from inside the interval callback
// without re-arming the timer on every state change.
const busyRef = useRef<Busy>(null)
- busyRef.current = busy
+ useEffect(() => { busyRef.current = busy }, [busy])
const refresh = useCallback(async () => {
const [e, i, v, vm] = await Promise.all([
@@ -100,37 +94,13 @@ export function MlxMediaSettings({ only }: { only?: 'image' | 'video' } = {}) {
setVideos(vm)
}, [])
+ // The state writes sit behind four awaits inside `refresh`; the compiler
+ // lint reads through the callback and calls them synchronous anyway.
useEffect(() => {
+ // eslint-disable-next-line react-hooks/set-state-in-effect
void refresh()
}, [refresh])
- // The keychain is the store of record; Rust only holds the token in memory,
- // so every app start has to push it down again. Doing that here means the
- // token is live before the user can start a download from this very panel.
- useEffect(() => {
- void (async () => {
- const stored = await secretGet(HF_TOKEN_ACCOUNT).catch(() => null)
- if (!stored) return
- setHfToken(stored)
- await applyHfToken(stored).catch(() => {})
- })()
- }, [])
-
- const saveHfToken = useCallback(async () => {
- setHfSaving(true)
- setError(null)
- try {
- const value = hfToken.trim()
- await secretSet(HF_TOKEN_ACCOUNT, value)
- await applyHfToken(value)
- setHfSaved(true)
- } catch (e) {
- setError(e instanceof Error ? e.message : String(e))
- } finally {
- setHfSaving(false)
- }
- }, [hfToken])
-
// Poll the Rust install slot for whichever install is running.
useEffect(() => {
if (!busy) return
@@ -292,34 +262,6 @@ export function MlxMediaSettings({ only }: { only?: 'image' | 'video' } = {}) {
</div>
)}
- <div className="p-2.5 rounded-lg border border-gray-200 dark:border-white/8">
- <div className="flex items-center gap-1.5">
- <KeyRound size={12} className="text-gray-500" />
- <span className="text-[0.7rem] text-gray-800 dark:text-gray-200">HuggingFace token</span>
- <span className="text-[0.55rem] text-gray-500">optional</span>
- </div>
- <div className="text-[0.6rem] text-gray-500 leading-relaxed mt-1">
- Models download from HuggingFace. Without a token those downloads are anonymous, and the hub throttles them
- heavily; a slow download is almost always this. A free token also unlocks models that require accepting a
- licence. Stored in your Mac keychain, never sent anywhere but HuggingFace.
- </div>
- <div className="flex gap-1.5 mt-2">
- <input
- type="password"
- value={hfToken}
- onChange={(e) => { setHfToken(e.target.value); setHfSaved(false) }}
- placeholder="hf_…"
- spellCheck={false}
- aria-label="HuggingFace token"
- className="flex-1 min-w-0 px-2 py-1 rounded text-[0.65rem] font-mono bg-gray-50 dark:bg-white/[0.04] border border-gray-200 dark:border-white/10 outline-none focus:border-purple-400"
- />
- <button className={primaryCls} onClick={saveHfToken} disabled={hfSaving}>
- {hfSaved ? <Check size={11} /> : null}
- {hfSaved ? 'Saved' : 'Save'}
- </button>
- </div>
- </div>
-
{/* ── Image ─────────────────────────────────────────── */}
{showImage && (<>
<div className="flex items-center gap-1.5 pt-1">
diff --git a/src/components/settings/SettingsPage.tsx b/src/components/settings/SettingsPage.tsx
index 95e888ee..a1bd9504 100644
--- a/src/components/settings/SettingsPage.tsx
+++ b/src/components/settings/SettingsPage.tsx
@@ -62,6 +62,7 @@ import {
type LmStudioModelDir,
} from '../../lib/model-storage-rows'
import { CivitaiApiKeySetting } from './CivitaiApiKeySetting'
+import { HfTokenSetting } from './HfTokenSetting'
import { HINWEIS_TEXT, PUNKT_FARBE } from '../../lib/hinweis'
// ── User profile picture (Appearance) ───────────────────────────
@@ -2032,6 +2033,12 @@ export function SettingsPage() {
<CivitaiApiKeySetting />
</Section>
+ {/* Same reasoning, other hub: the downloader sends this token to
+ huggingface.co, and a gated repository's 401 names this field. */}
+ <Section title="Hugging Face token">
+ <HfTokenSetting />
+ </Section>
+
{builtinManaged && (
<Section title="LU Engine (expert)">
<BuiltinEngineSettings />
diff --git a/src/components/settings/__tests__/hf-token-field-renders.test.ts b/src/components/settings/__tests__/hf-token-field-renders.test.ts
new file mode 100644
index 00000000..2ecb49e4
--- /dev/null
+++ b/src/components/settings/__tests__/hf-token-field-renders.test.ts
@@ -0,0 +1,58 @@
+/**
+ * @vitest-environment jsdom
+ *
+ * The Hugging Face token field, rendered for real, on a platform that is not
+ * a Mac. Until 2.6.8 the field lived only in the Apple MLX panel, so a Windows
+ * user who hit a gated repository had nowhere to put the token the error
+ * message now asks for.
+ *
+ * Run: npx vitest run src/components/settings/__tests__/hf-token-field-renders.test.ts
+ */
+import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
+import { createElement } from 'react'
+import { render, screen, fireEvent, cleanup, waitFor } from '@testing-library/react'
+
+const secretSet = vi.fn().mockResolvedValue(undefined)
+const secretGet = vi.fn().mockResolvedValue(null)
+const applyHfToken = vi.fn().mockResolvedValue({ present: true })
+vi.mock('../../../api/backend', () => ({
+ openExternal: vi.fn(),
+ backendCall: vi.fn(),
+ isTauri: () => true,
+ isMacOS: () => false,
+ secretGet: (...a: unknown[]) => secretGet(...a),
+ secretSet: (...a: unknown[]) => secretSet(...a),
+ secretDelete: vi.fn(),
+}))
+vi.mock('../../../api/mlx-image', () => ({
+ HF_TOKEN_ACCOUNT: 'huggingface-token',
+ applyHfToken: (...a: unknown[]) => applyHfToken(...a),
+}))
+
+import { HfTokenSetting } from '../HfTokenSetting'
+
+beforeEach(() => { secretSet.mockClear(); secretGet.mockReset().mockResolvedValue(null); applyHfToken.mockClear() })
+afterEach(cleanup)
+
+describe('the Hugging Face token field', () => {
+ it('is there, masked, and saves into the vault and into Rust', async () => {
+ render(createElement(HfTokenSetting))
+ const input = screen.getByLabelText('Hugging Face token') as HTMLInputElement
+ expect(input.type).toBe('password')
+ fireEvent.change(input, { target: { value: ' hf_abc ' } })
+ expect(secretSet).not.toHaveBeenCalled()
+ fireEvent.click(screen.getByText('Save'))
+ await waitFor(() => expect(secretSet).toHaveBeenCalledWith('huggingface-token', 'hf_abc'))
+ expect(applyHfToken).toHaveBeenCalledWith('hf_abc')
+ expect(await screen.findByText('Saved')).toBeTruthy()
+ })
+
+ it('shows a stored token as present and removes it with an empty write', async () => {
+ secretGet.mockResolvedValue('hf_stored')
+ render(createElement(HfTokenSetting))
+ const remove = await screen.findByText('Remove')
+ fireEvent.click(remove)
+ await waitFor(() => expect(secretSet).toHaveBeenCalledWith('huggingface-token', ''))
+ expect(applyHfToken).toHaveBeenCalledWith('')
+ })
+})
diff --git a/src/components/settings/settings-nav.ts b/src/components/settings/settings-nav.ts
index b49a841f..38032a9b 100644
--- a/src/components/settings/settings-nav.ts
+++ b/src/components/settings/settings-nav.ts
@@ -92,6 +92,7 @@ export function sectionsFor(tab: SettingsTab, flags: SettingsSectionFlags): stri
'Providers',
'Model Storage',
'CivitAI API key',
+ 'Hugging Face token',
...(flags.builtinExpert ? ['LU Engine (expert)'] : []),
flags.comfyui ? 'ComfyUI (Image & Video)' : 'Local Media (Apple MLX)',
]
diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts
index 98256286..3f518040 100644
--- a/src/lib/release-notes.ts
+++ b/src/lib/release-notes.ts
@@ -45,6 +45,7 @@ export const RELEASE_NOTES: ReleaseNote[] = [
{
title: 'Local',
items: [
+ 'The uncensored Qwen 3.8 27B rows come from OrcaRouter\'s abliteration now, bartowski\'s ungated GGUF requant with the vision projector, and Ollama gets OrcaRouter\'s own tag. A gated Hugging Face repo used to end in "trying again cannot help"; the download now says that the repo needs an accepted licence and a Hugging Face token, and names the field: Settings, AI Backends, Hugging Face token. The field exists on Windows and Linux now, and the token goes to huggingface.co with every model download.',
'The side panel folds away. While it is closed your latest chats sit on the main screen, and they belong to the panel again the moment you open it.',
'The tabs at the top and the tool row in Create scroll instead of wrapping. The entry you picked sits in the middle, the ones beside it fade towards the edges, and a click slides your pick to the centre. On a narrow window the Create row used to break onto a second line and shove the stage below it down by 36 pixels. It stays one line now.',
'Which model the open chat ran on no longer takes a chip of its own in the composer row. It is a small dot on the corner of the model picker now, the full sentence sits in the picker tooltip, and the dot is only there when the chat on screen and the pick beside it disagree.',
diff --git a/src/lib/rust-boot-sync.ts b/src/lib/rust-boot-sync.ts
index 04b057e6..cdf919b1 100644
--- a/src/lib/rust-boot-sync.ts
+++ b/src/lib/rust-boot-sync.ts
@@ -20,7 +20,7 @@
import { useSettingsStore } from '../stores/settingsStore'
export async function pushPersistedChoicesToRust(): Promise<void> {
- const [{ invoke }, { isMlxImageHost, applyHfToken, HF_TOKEN_ACCOUNT }] = await Promise.all([
+ const [{ invoke }, { applyHfToken, HF_TOKEN_ACCOUNT }] = await Promise.all([
import('@tauri-apps/api/core'),
import('../api/mlx-image'),
])
@@ -39,8 +39,8 @@ export async function pushPersistedChoicesToRust(): Promise<void> {
// holds it in memory only, so every boot pushes it down again. Without
// this, only opening Settings would arm the token, and a model download
// started from Create, the Model Manager or the wizard would still go out
- // anonymous and throttled.
- if (!isMlxImageHost()) return
+ // anonymous and throttled. Every platform: since 2.6.8 the GGUF downloader
+ // sends the token to huggingface.co too, not only the Mac media lane.
const { secretGet } = await import('../api/backend')
const stored = await secretGet(HF_TOKEN_ACCOUNT).catch(() => null)
if (stored) await applyHfToken(stored).catch(() => {})