Elffuss BraidHub

utopia-ia/elffuss-code public

Stock Gemma-4 E4B says its real download size; e2e checks follow the tabs and the E4B options

- tests/e2e.mjs read '.tab.active', which since c769f18 (conversations in
  tabs) also matches the active conversation tab: Playwright's strict mode
  threw, the `.catch(() => '')` turned it into an empty string and checks 2
  and 5 failed with the file correctly open. They read '#tabs-bar .tab.active'
  now, with a bounded wait whose error, if any, is shown in the check.
- Check 8 expected no option matching /E4B/ at all. That was written when the
  only E4B was the broken "healed" self-export; de7a37e then added Google's
  stock Gemma-4 E4B on purpose. It now matches by id and name: the healed one
  ('litert', 'litert:elffuss-e4b', "Elffuss ... E4B") must not be offered.
- The stock E4B was labelled "~4 GB" in the selector, the card, the Lab and the
  provider's tag; Claw relabelled it with the measured download (04e4554:
  2832 MB) as "~2.8 GB". Code says the same now.
Changeset48f115f6583252e4a9381ea17399f3d3f1d912c4cb2deaf22d07f9d87300df3d
AuthorKikoCis <kikocisneros@gmail.com> · 2026-10-11 15:10 +02:00
CommitterKikoCis <kikocisneros@gmail.com> · 2026-10-11 15:10 +02:00
Parents08a4eae756d0

Browse the files at this changeset

5 files changed

modified tests/e2e.mjs +11 −5
@@ -50,8 +50,10 @@
5050 await p.locator('#tree .file', { hasText: 'index.js' }).click();
5151 await p.waitForTimeout(1000);
5252 const hasCode = await p.evaluate(() => window.monaco?.editor.getModels().some(m => m.getValue().includes('saludo')));
53- const tab = await p.locator('.tab.active').textContent().catch(() => '');
54- ok('2 · abrir archivo del árbol → Monaco con su contenido', hasCode && /index\.js/.test(tab));
53+ // Solo las pestañas del EDITOR: desde c769f18 las conversaciones también son
54+ // .tab.active (en #conv-tabs) y el selector suelto encontraba dos.
55+ const tab = await p.locator('#tabs-bar .tab.active').textContent({ timeout: 5000 }).catch(e => 'ERROR: ' + e.message.split('\n')[0]);
56+ ok('2 · abrir archivo del árbol → Monaco con su contenido', hasCode && /index\.js/.test(tab), tab);
5557 await p.context().close();
5658 }
5759
@@ -86,7 +88,9 @@
8688 await p.fill('#pal-input', 'utils'); await p.waitForTimeout(400);
8789 const hits = await p.locator('.pal-item .pi-name').allTextContents();
8890 await p.locator('.pal-item').first().click(); await p.waitForTimeout(700);
89- const tab = await p.locator('.tab.active').textContent().catch(() => '');
91+ // Solo las pestañas del EDITOR: desde c769f18 las conversaciones también son
92+ // .tab.active (en #conv-tabs) y el selector suelto encontraba dos.
93+ const tab = await p.locator('#tabs-bar .tab.active').textContent({ timeout: 5000 }).catch(e => 'ERROR: ' + e.message.split('\n')[0]);
9094 ok('5 · Command Palette abre, busca y abre el archivo', open && hits.some(h => /utils\.py/.test(h)) && /utils\.py/.test(tab));
9195 await p.context().close();
9296 }
@@ -113,8 +117,10 @@
113117 // ============ 8 · el E4B roto NO es cargable (anti-crash) ============
114118 {
115119 const p = await ide();
116- const opts = await p.$$eval('#model-select option', os => os.map(o => o.textContent));
117- ok('8 · Gemma E4B roto no se ofrece en el selector', !opts.some(o => /E4B/.test(o)), JSON.stringify(opts));
120+ // El E4B «healed» propio (roto) no se ofrece. El Gemma-4 E4B oficial de Google
121+ // SÍ (de7a37e, con GPU de verdad): se mira el id y el nombre, no «E4B» suelto.
122+ const opts = await p.$$eval('#model-select option', os => os.map(o => ({ id: o.value, label: o.textContent })));
123+ ok('8 · el E4B healed (roto) no se ofrece en el selector', !opts.some(o => o.id === 'litert' || o.id === 'litert:elffuss-e4b' || /Elffuss[^·]*E4B|healed/i.test(o.label)), JSON.stringify(opts.map(o => o.label)));
118124 await p.context().close();
119125 }
120126
modified web/js/i18n.js +2 −2
@@ -73,7 +73,7 @@
7373 setTitle: "Ajustes",
7474 close: "cerrar",
7575 setBrainTitle: "Cerebro (modelo)",
76- setModelE4bSub: "El mejor · WebGPU local · ~4 GB",
76+ setModelE4bSub: "El mejor · WebGPU local · ~2.8 GB",
7777 setModelE2bSub: "Ligero · WebGPU local · ~2 GB",
7878 setModelOnnxSub: "Ligero · WebGPU o CPU · ~600 MB",
7979 setModelRulesSub: "Órdenes directas, cero descarga",
@@ -298,7 +298,7 @@
298298 setTitle: "Settings",
299299 close: "close",
300300 setBrainTitle: "Brain (model)",
301- setModelE4bSub: "The best · local WebGPU · ~4 GB",
301+ setModelE4bSub: "The best · local WebGPU · ~2.8 GB",
302302 setModelE2bSub: "Light · local WebGPU · ~2 GB",
303303 setModelOnnxSub: "Light · WebGPU or CPU · ~600 MB",
304304 setModelRulesSub: "Direct commands, zero download",
modified web/js/lab.js +1 −1
@@ -74,7 +74,7 @@
7474 ['rules', 'Reglas (sin GPU)', 'Determinista. Valida el arnés sin bajar pesos.'],
7575 ['onnx:qwen3.5-0.8b', 'Qwen3.5-0.8B (CPU/wasm)', 'El ligero, por transformers.js.'],
7676 ['litert:gemma-e2b', 'Gemma-4 E2B (~2 GB)', 'WebGPU.'],
77- ['litert:gemma-e4b', 'Gemma-4 E4B (~3 GB)', 'WebGPU. El mejor.'],
77+ ['litert:gemma-e4b', 'Gemma-4 E4B (~2.8 GB)', 'WebGPU. El mejor.'],
7878 ];
7979
8080 // Arranca con el cerebro que tenga el IDE, si es uno de los del Lab.
modified web/js/main.js +2 −2
@@ -631,7 +631,7 @@
631631 async function pickLocalBrain() {
632632 const c = await gpuCapacity();
633633 if (c.gpu && !isMobile()) {
634- if (c.maxBuf >= 2 ** 31 && c.mem >= 8) return 'litert:gemma-e4b'; // ~4 GB
634+ if (c.maxBuf >= 2 ** 31 && c.mem >= 8) return 'litert:gemma-e4b'; // ~2.8 GB
635635 if (c.maxBuf >= 2 ** 30 && c.mem >= 6) return 'litert:gemma-e2b'; // ~2 GB
636636 }
637637 if (c.gpu && isMobile()) return 'litert:gemma-e2b';
@@ -696,7 +696,7 @@
696696 // nombre que se queda viejo.
697697 function modelOptionsLocales() {
698698 const opts = [];
699- if (realGPU) opts.push({ id: 'litert:gemma-e4b', label: 'Gemma-4 E4B · LiteRT-LM (~4 GB) ★' });
699+ if (realGPU) opts.push({ id: 'litert:gemma-e4b', label: 'Gemma-4 E4B · LiteRT-LM (~2.8 GB) ★' });
700700 if (realGPU) opts.push({ id: 'litert:gemma-e2b', label: 'Gemma-4 E2B · LiteRT-LM (~2 GB)' });
701701 // `onnx` a secas era Elffuss LM y se ha quitado. Ojo con el patrón: ESTE era
702702 // el TERCER sitio donde el mismo modelo estaba declarado a mano (el registro
modified web/js/providers/litert.js +1 −1
@@ -13,7 +13,7 @@
1313 // (E-010), por eso está gateado en el selector.
1414 export const MODELS = {
1515 'gemma-e2b': { url: 'https://huggingface.co/litert-community/gemma-4-E2B-it-litert-lm/resolve/main/gemma-4-E2B-it-web.litertlm', label: 'Gemma-4 E2B', tag: '~2 GB · ligero' },
16- 'gemma-e4b': { url: 'https://huggingface.co/litert-community/gemma-4-E4B-it-litert-lm/resolve/main/gemma-4-E4B-it-web.litertlm', label: 'Gemma-4 E4B', tag: '~4 GB · el mejor' },
16+ 'gemma-e4b': { url: 'https://huggingface.co/litert-community/gemma-4-E4B-it-litert-lm/resolve/main/gemma-4-E4B-it-web.litertlm', label: 'Gemma-4 E4B', tag: '~2.8 GB · el mejor' },
1717 'elffuss-e4b': { url: 'https://huggingface.co/KikoCis/Elffuss-Gemma4-E4B-litert/resolve/main/model.litertlm', label: 'Elffuss E4B (healed)', tag: 'modelo propio' },
1818 };
1919