Pull requests / #346
#346 setup: don't list the shared Chat settings file as a model config (KeyError: 'exe')
closed · @xidus90 · 0 Kommentare · Auf GitHub
Setup & installServer & APIModels & quantsWindows
Beschreibung
## 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.
Mehr auf der Site
Links zu Install, Modellen, Releases.