#5858 [TUI] Add a user-wide configuration file shared across models and presets

closed · @sasasin · 1 commentaires · Sur GitHub

Setup & installServer & APIAMD / HIPDocumentationWindowsLinux

Description

### Area

[TUI]

### What do you want to do?

I would like a user-wide configuration file whose settings continue to apply when I switch models or presets.

I use Strata's API with DeepSeek Harness and want to set `undeclared_tool_calls` to `"call"`. This is one example; the broader need is to keep settings in one place without tying them to a particular model or preset.

In my current installation, I can add this top-level key to either of these JSON files:

| Configuration | Example from my installation |
| --- | --- |
| Generated run configuration for a preset | `$HOME/.local/state/strata/launch/q38fn.json` |
| Model configuration | `$HOME/.local/share/strata/install/strata-unsloth-ud-iq2_xs.json` |

```json
{
  "undeclared_tool_calls": "call"
}
```

This snippet shows the key to add, rather than a replacement for the complete configuration file.

Both files are tied to a particular launch configuration or model. When I switch to another model or preset, I need to keep the same preference consistent across additional files. The `launch/<preset-slug>.json` file is also rebuilt at launch, which makes a manual edit there unsuitable as a place to maintain user-wide settings.

#### Desired behavior

- Settings written once in a user-wide file apply as defaults when starting different models or presets.
- The file supports the relevant JSON configuration keys, including settings that have no environment-variable equivalent.
- Model-specific, preset-specific, or explicit launch settings can override these defaults, with documented precedence.
- Existing behavior is preserved when no user-wide configuration is provided.

I am open to a filename, format, and integration approach that fit Strata's existing configuration design. I am not asking to change the default value of `undeclared_tool_calls` to `"call"` for everyone.

#### How this differs from existing shared settings

I found the existing `.shared-settings.json` mechanism. In the installed Control component I inspected, its path is derived from the run configuration's filename, and its accepted keys are limited to shared Chat settings. My understanding is that it does not provide a user-wide location for server settings such as `undeclared_tool_calls` across models and presets.

I also checked `$HOME/.config/strata/settings.json`, but could not find a path that reads this option from it as a user-wide setting. If there is already a supported mechanism for this, a pointer to the documentation would be appreciated.

### What do you do today instead?

My current workaround is to export the following variable in my Bash startup configuration, loaded by `~/.bashrc`:

```bash
export STRATA_UNDECLARED_TOOL_CALLS=call
```

I then launch Strata normally from that environment:

```bash
strata launch --preset Q38FN
```

I verified that this works for `undeclared_tool_calls`. However, it depends on an environment-variable equivalent being implemented for each setting, so it cannot cover settings without one. It also depends on environment inheritance from the shell or other launching process. A common configuration file read by Strata itself would make these preferences easier to manage together.

#### Environment

- OS: Ubuntu 26.04.1 LTS, Linux `7.0.0-43-generic`
- `strata --version`: `strata 0.2.13.1 (build 0.1.59.1; python 3.12.15)` (local interpreter path omitted)
- Installed Control component's `COMMIT`: [`628f74955a56fcba092495b800dd02af75373a0f`](https://github.com/Niko1221/Strata/commit/628f74955a56fcba092495b800dd02af75373a0f)
- Model: Qwen3.8-Flash-Next, Unsloth UD-IQ2_XS, HIP
- Client: DeepSeek Harness `0.2.2-rc.1`, PTC mode

#### Validation and scope

**Observed locally:**

- I verified that the key can be added to the model and run configuration JSON files.
- I started Strata with the environment variable and verified that the Python API server process itself received `STRATA_UNDECLARED_TOOL_CALLS=call`.
- In both non-streaming and streaming responses, an undeclared `read` was returned in `tool_calls`. In a test that supplied the same correction error as the client, the next response switched to a valid `run_code` call.
- Running the installed `clean_shared_defaults` function in isolation with `{"undeclared_tool_calls": "call"}` raised `ValueError: unknown setting 'undeclared_tool_calls'`. This isolated check did not restart the server or write to `/settings`.

**Code and documentation inspection:**

- [`undeclared_tool_calls_setting` and shared-settings loading](https://github.com/Niko1221/Strata/blob/628f74955a56fcba092495b800dd02af75373a0f/serve/server.py): this option is read from the run configuration, then the environment, then the default. I could not identify a user-wide configuration-file layer for it.
- [Terminal configuration precedence](https://github.com/Niko1221/Strata/blob/628f74955a56fcba092495b800dd02af75373a0f/docs/TERMINAL_LAUNCH.md): the run configuration is rebuilt using explicit launch values, persisted overrides, calibrated values, and generated defaults.

This is a feature request for a user-wide configuration location. I have not reproduced a failure across every setting, model, or launch path, and I have not tested the desktop app or Windows/macOS behavior.

#### Related discussions

- [#4622](https://github.com/Niko1221/Strata/issues/4622) and [PR #4710](https://github.com/Niko1221/Strata/pull/4710) discuss the behavior of `undeclared_tool_calls`. This request concerns where preferences like that can be stored once and shared across models and presets.

Sur le site

Liens install, modèles, releases.