Skip to content

setup: don't list the shared Chat settings file as a model config (KeyError: 'exe') - #346

Closed
xidus90 wants to merge 1 commit into
Niko1221:mainfrom
xidus90:fix/setup-skip-shared-settings
Closed

xidus90 wants to merge 1 commit into
Niko1221:mainfrom
xidus90:fix/setup-skip-shared-settings

Conversation

@xidus90

@xidus90 xidus90 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

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.

…eyError: 'exe')

The server keeps a config's Chat settings next to it as strata-<model>.shared-settings.json. It matches the
strata-*.json pattern, so START-HERE listed it as a model of its own, and picking it stopped with KeyError: 'exe'.
The "set up like the last one" lookup could also pick it, since it is written after the config. setup.py now lists
model configs through one helper that leaves it out (start menu, previous config, model-file move).
@Niko1221

Niko1221 commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Fixed in 0.1.40: model_config_files() leaves the shared Chat settings file out in the start menu, in 'set up like the last one', in the data-folder move and in the MCP server's config list. Thanks for the report and the tests.

@Niko1221 Niko1221 closed this Oct 6, 2026
Niko1221 added a commit that referenced this pull request Oct 6, 2026
model_config_files() leaves strata-<model>.shared-settings.json out in the start menu, previous_config, the
data-folder move and strata_mcp.configs().

Co-authored-by: Christoph Wübbels <christoph.wuebbels@gmail.com>
anon761 pushed a commit to anon761/Strata-upstream that referenced this pull request Oct 6, 2026
model_config_files() leaves strata-<model>.shared-settings.json out in the start menu, previous_config, the
data-folder move and strata_mcp.configs().

Co-authored-by: Christoph Wübbels <christoph.wuebbels@gmail.com>
sskver pushed a commit to sskver/Strata that referenced this pull request Oct 7, 2026
model_config_files() leaves strata-<model>.shared-settings.json out in the start menu, previous_config, the
data-folder move and strata_mcp.configs().

Co-authored-by: Christoph Wübbels <christoph.wuebbels@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants