[PR #346] [CLOSED] setup: don't list the shared Chat settings file as a model config (KeyError: 'exe') #2589

Closed
opened 2026-11-04 02:01:36 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/346
Author: @xidus90
Created: 10/1/2026
Status: ❌ Closed

Base: main ← Head: fix/setup-skip-shared-settings


📝 Commits (1)

  • ecd87bd setup: the shared Chat settings file is no model config (start menu KeyError: 'exe')

📊 Changes

2 files changed (+72 additions, -3 deletions)

View changed files

📝 setup.py (+9 -3)
➕ tools/test_setup_configs.py (+63 -0)

📄 Description

Problem

Once Chat settings have been saved for all clients in the web UI, START-HERE.bat lists the settings file as a model of its own. Picking it crashes:

  1) qwen3.8-flash-next-iq3_s
  2) strata-iq3_s.shared-settings
  3) install another model / change settings
Which one? [1]: 2
Traceback (most recent call last):
  ...
  File "setup.py", line 1717, in start
    missing = [p for p in [cfg["exe"], *[a for a in cfg["args"] if a.endswith(".gguf")]] if not Path(p).exists()]
KeyError: 'exe'

Service.set_shared() in serve/server.py writes the settings to strata-<model>.shared-settings.json next to the config (serve/server.py:2042). That name matches the strata-*.json pattern setup.py uses to find model configs. Anyone who has saved shared settings once has the file, and resetting the settings deletes it again.

Fix

A new helper, model_configs(folder), lists strata-*.json without *.shared-settings.json. All three places that globbed for configs now use it:

  • installed_configs(): the start menu (the crash above).
  • previous_config(): "set up like the last one" from another install. The settings file is written after the config, so max(mtime) could pick it there, and choices_from_config() would then read empty args.
  • the model-file move, which repoints configs to the new data folder. Harmless before, since the settings file holds no paths; changed only so all three places are consistent.

Name-based filtering is sufficient. serve/server.py, setup.py and tools/calibrate.py write no other strata-*.json next to a config, and calibration results go into the config's own args.

Tests

python -m unittest tools.test_setup_configs

The three new tests fail on main and pass with the fix. The existing tools.test_setup_pins, test_setup_amd, test_setup_lowram, test_setup_rope, test_calibrate and test_shards still pass (61 tests). previous_config() also scans the Strata* folders next to the checkout, so the tests patch other_installs() to keep real installs on the test machine out.

Tested on Windows 11 with Python 3.13. On a real install with both files, the menu now lists only strata-iq3_s.json.

I found no existing issue or PR for this.


🔄 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/346 **Author:** [@xidus90](https://github.com/xidus90) **Created:** 10/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/setup-skip-shared-settings` --- ### 📝 Commits (1) - [`ecd87bd`](https://github.com/Niko1221/Strata/commit/ecd87bd0d4b9148f844985f6f605b1adbaca2cec) setup: the shared Chat settings file is no model config (start menu KeyError: 'exe') ### 📊 Changes **2 files changed** (+72 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+9 -3) ➕ `tools/test_setup_configs.py` (+63 -0) </details> ### 📄 Description ## Problem Once Chat settings have been saved for all clients in the web UI, `START-HERE.bat` lists the settings file as a model of its own. Picking it crashes: ``` 1) qwen3.8-flash-next-iq3_s 2) strata-iq3_s.shared-settings 3) install another model / change settings Which one? [1]: 2 Traceback (most recent call last): ... File "setup.py", line 1717, in start missing = [p for p in [cfg["exe"], *[a for a in cfg["args"] if a.endswith(".gguf")]] if not Path(p).exists()] KeyError: 'exe' ``` `Service.set_shared()` in `serve/server.py` writes the settings to `strata-<model>.shared-settings.json` next to the config (`serve/server.py:2042`). That name matches the `strata-*.json` pattern `setup.py` uses to find model configs. Anyone who has saved shared settings once has the file, and resetting the settings deletes it again. ## Fix A new helper, `model_configs(folder)`, lists `strata-*.json` without `*.shared-settings.json`. All three places that globbed for configs now use it: - `installed_configs()`: the start menu (the crash above). - `previous_config()`: "set up like the last one" from another install. The settings file is written after the config, so `max(mtime)` could pick it there, and `choices_from_config()` would then read empty args. - the model-file move, which repoints configs to the new data folder. Harmless before, since the settings file holds no paths; changed only so all three places are consistent. Name-based filtering is sufficient. `serve/server.py`, `setup.py` and `tools/calibrate.py` write no other `strata-*.json` next to a config, and calibration results go into the config's own `args`. ## Tests ``` python -m unittest tools.test_setup_configs ``` The three new tests fail on `main` and pass with the fix. The existing `tools.test_setup_pins`, `test_setup_amd`, `test_setup_lowram`, `test_setup_rope`, `test_calibrate` and `test_shards` still pass (61 tests). `previous_config()` also scans the `Strata*` folders next to the checkout, so the tests patch `other_installs()` to keep real installs on the test machine out. Tested on Windows 11 with Python 3.13. On a real install with both files, the menu now lists only `strata-iq3_s.json`. I found no existing issue or PR for this. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:36 +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#2589
No description provided.