[PR #2258] [CLOSED] Add opt-in browser model downloads and switching through official setup #3950

Closed
opened 2026-11-07 15:31:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2258
Author: @kw39
Created: 10/13/2026
Status: ❌ Closed

Base: main ← Head: feature/web-model-manager


📝 Commits (4)

  • 3cdaa62 Add opt-in browser model manager using official setup
  • d02d02d Fix cross-platform model switching and cancellation
  • f54af5b Update checkout action to the Node.js 24 runtime
  • 7e86f94 Preserve setup backups and keep lazy model chat accessible

📊 Changes

14 files changed (+1593 additions, -2 deletions)

View changed files

➕ .github/workflows/model-manager.yml (+51 -0)
📝 .gitignore (+2 -0)
➕ MODELS.bat (+8 -0)
📝 docs/MODELS.md (+4 -0)
➕ docs/MODEL_MANAGER.md (+125 -0)
➕ models.sh (+7 -0)
➕ serve/web/models.css (+63 -0)
➕ serve/web/models.html (+74 -0)
➕ serve/web/models.js (+121 -0)
📝 tools/strata_mcp.py (+12 -1)
➕ tools/strata_models.py (+522 -0)
📝 tools/test_strata_mcp.py (+58 -1)
➕ tools/test_strata_models.py (+475 -0)
➕ tools/test_strata_models_web.js (+71 -0)

📄 Description

Users currently run setup and separate start scripts to download or change models. This adds an opt-in Models table with download review, progress, start/stop and switching that stays available while setup or a model loads.

Launch with MODELS.bat or sh models.sh. The Models page listens on 127.0.0.1:8090; chat and the API use port 8080.

  • Read regular model choices from setup.py and run setup.py --setup --yes --no-start. Official setup chooses GPU, backend, context, KV, low-RAM mode and cache settings. Downloads require a reviewed plan with its data folder pinned.
  • Keep a compatible shared Qwen lookup-table location after checking shard metadata. Preserve official setup's .json.bak of the user's earlier settings and save the generated config separately to .json.lookup.bak before changing paths. Swift and Unsloth keep their own tables; OrcaRouter and experimental models link to manual workflows.
  • Check files before switching, refuse busy or externally started servers, and attempt to restore the previous model if a new load fails. Keep Open Chat available for healthy lazy-loading and idle-unloaded servers, which load on the next request.
  • Keep management local with Host/Origin checks, same-origin JSON requests and a per-launch token. Recover pending setup after reopening and allow one Models launcher per checkout.

Lifecycle fixes cover the reported Linux TIME_WAIT port reuse and setup cancellation races. Windows retains exclusive port checks and ends the verified owned process tree after unloading, including virtual-environment launcher children.

The normal installer, default web app, server and engine backends remain unchanged from the feature's v0.1.43.1 merge base. The shared management helper receives the port-probe and Windows-stop fixes. No inference tuning or OrcaRouter conversion is added.

Validation:

  • All six Windows/Ubuntu CI jobs pass with Python 3.10, 3.12 and 3.14. Each runs 59 Python tests (one expected platform-specific skip) and five page behavior tests. Latest CI results.
  • Local Windows 10 / Python 3.14.4 and Ubuntu/WSL2 / Python 3.12.3 runs passed the 59-test suite. Python/JavaScript syntax, Linux launcher syntax and diff checks passed.
  • Regression coverage includes official setup backup preservation, repeated lookup recovery, lazy loading, idle-unloaded chat access, real TIME_WAIT sockets, repeated switching, rollback, early/concurrent cancellation, Windows child shutdown and local request protection.
  • Headless Edge checks confirmed chat access for lazy/idle-unloaded servers and hidden chat during switching. Earlier desktop/mobile layout checks also passed.
  • Tests use fake setup/server processes and status responses: actual model downloads and GPU inference were not run. No C++/CUDA/HIP/SYCL sources changed.

Related to #925. Usage and limitations are documented in docs/MODEL_MANAGER.md.


🔄 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/2258 **Author:** [@kw39](https://github.com/kw39) **Created:** 10/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/web-model-manager` --- ### 📝 Commits (4) - [`3cdaa62`](https://github.com/Niko1221/Strata/commit/3cdaa628d2b52b6a310f92d686b600014279719f) Add opt-in browser model manager using official setup - [`d02d02d`](https://github.com/Niko1221/Strata/commit/d02d02daeec9c4f16c029bacd3f656c90bb44542) Fix cross-platform model switching and cancellation - [`f54af5b`](https://github.com/Niko1221/Strata/commit/f54af5b17f35ccfddbeba3f11c77bd4a02e56f6b) Update checkout action to the Node.js 24 runtime - [`7e86f94`](https://github.com/Niko1221/Strata/commit/7e86f94c30cd7b264839de51e21a624731ff972a) Preserve setup backups and keep lazy model chat accessible ### 📊 Changes **14 files changed** (+1593 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/model-manager.yml` (+51 -0) 📝 `.gitignore` (+2 -0) ➕ `MODELS.bat` (+8 -0) 📝 `docs/MODELS.md` (+4 -0) ➕ `docs/MODEL_MANAGER.md` (+125 -0) ➕ `models.sh` (+7 -0) ➕ `serve/web/models.css` (+63 -0) ➕ `serve/web/models.html` (+74 -0) ➕ `serve/web/models.js` (+121 -0) 📝 `tools/strata_mcp.py` (+12 -1) ➕ `tools/strata_models.py` (+522 -0) 📝 `tools/test_strata_mcp.py` (+58 -1) ➕ `tools/test_strata_models.py` (+475 -0) ➕ `tools/test_strata_models_web.js` (+71 -0) </details> ### 📄 Description Users currently run setup and separate start scripts to download or change models. This adds an opt-in Models table with download review, progress, start/stop and switching that stays available while setup or a model loads. Launch with `MODELS.bat` or `sh models.sh`. The Models page listens on `127.0.0.1:8090`; chat and the API use port 8080. - Read regular model choices from `setup.py` and run `setup.py --setup --yes --no-start`. Official setup chooses GPU, backend, context, KV, low-RAM mode and cache settings. Downloads require a reviewed plan with its data folder pinned. - Keep a compatible shared Qwen lookup-table location after checking shard metadata. Preserve official setup's `.json.bak` of the user's earlier settings and save the generated config separately to `.json.lookup.bak` before changing paths. Swift and Unsloth keep their own tables; OrcaRouter and experimental models link to manual workflows. - Check files before switching, refuse busy or externally started servers, and attempt to restore the previous model if a new load fails. Keep Open Chat available for healthy lazy-loading and idle-unloaded servers, which load on the next request. - Keep management local with Host/Origin checks, same-origin JSON requests and a per-launch token. Recover pending setup after reopening and allow one Models launcher per checkout. Lifecycle fixes cover the reported Linux TIME_WAIT port reuse and setup cancellation races. Windows retains exclusive port checks and ends the verified owned process tree after unloading, including virtual-environment launcher children. The normal installer, default web app, server and engine backends remain unchanged from the feature's v0.1.43.1 merge base. The shared management helper receives the port-probe and Windows-stop fixes. No inference tuning or OrcaRouter conversion is added. Validation: - All six Windows/Ubuntu CI jobs pass with Python 3.10, 3.12 and 3.14. Each runs 59 Python tests (one expected platform-specific skip) and five page behavior tests. [Latest CI results](https://github.com/kw39/Strata/actions/runs/38693510176). - Local Windows 10 / Python 3.14.4 and Ubuntu/WSL2 / Python 3.12.3 runs passed the 59-test suite. Python/JavaScript syntax, Linux launcher syntax and diff checks passed. - Regression coverage includes official setup backup preservation, repeated lookup recovery, lazy loading, idle-unloaded chat access, real TIME_WAIT sockets, repeated switching, rollback, early/concurrent cancellation, Windows child shutdown and local request protection. - Headless Edge checks confirmed chat access for lazy/idle-unloaded servers and hidden chat during switching. Earlier desktop/mobile layout checks also passed. - Tests use fake setup/server processes and status responses: actual model downloads and GPU inference were not run. No C++/CUDA/HIP/SYCL sources changed. Related to #925. Usage and limitations are documented in `docs/MODEL_MANAGER.md`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:31:57 +07:00
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#3950
No description provided.