config: configurable max_new generation budget (default 16384) so CoT+answer are not truncated

This commit is contained in:
adm committed 2026-11-27 18:13:18 +01:00
1 parent 862897fdbc
commit 4cdc4334d8
6 files changed
+70 -16

No files matched your search

+13 -6
View File
@@ -267,12 +267,19 @@ uses `tracing`; set `RUST_LOG` to control verbosity (default `info`).
The config is the same JSON the other Strata tools use. Keys acted on here include
`exe`, `args`, `cwd`, `tokenizer`, `model_name`, `host`, `port`, `reasoning_effort`,
`sampling`, `api_key`, `allowed_hosts`, `db_path` (GUI session database),
`workspace_root` (framework root), `system_prompt` (general default), `language`
(UI/prompt catalog, default `it`), and the optional `startup_timeout_secs` /
`silence_timeout_secs`. Everything else (`arch`,
`mcp_servers`, `cors_origins`, …) is preserved untouched and reported as ignored —
unknown keys never break startup.
`max_new` (default generation budget, see below), `sampling`, `api_key`,
`allowed_hosts`, `db_path` (GUI session database), `workspace_root` (framework
root), `system_prompt` (general default), `language` (UI/prompt catalog, default
`it`), and the optional `startup_timeout_secs` / `silence_timeout_secs`. Everything
else (`arch`, `mcp_servers`, `cors_origins`, …) is preserved untouched and reported
as ignored — unknown keys never break startup.
**Generation budget (`max_new`).** When neither the request nor the session sets
`max_tokens`, generation is capped at `max_new` tokens (config, default **16384**).
Reasoning and answer share this ceiling: it was raised from 2048 because extended
chain-of-thought was being truncated mid-reasoning (`finish_reason: length`, empty
answer). The model still stops early at EOS, so the larger cap only matters when it
would otherwise run out; a per-session/per-request `max_tokens` still overrides it.
### Localization (i18n)