feat(config): expose router generation + narration knobs in config file

The router/narration model behaviour was hardcoded (Main built RouterConfig()
with defaults). Surface it under the [router] section so it's tunable without a
rebuild:

  [router]            conversation_keep_last, retrieval_k, token_budget
  [router.generation] temperature, top_p, max_tokens          (chat/steering)
  [router.narration]  temperature, top_p, max_tokens, max_per_run

ConfigLoader parses the new sections (adds asDouble); Main maps the config-layer
RouterConfig onto the domain RouterConfig and threads narration.max_per_run into
ServerModule. All values default to the previous constants, so behaviour is
unchanged when the sections are absent. Documents the block in sample-config.toml
and adds parser tests for present/absent cases.
This commit is contained in:
2026-06-03 23:09:48 +04:00
parent e95d2633f8
commit 371e0df340
5 changed files with 141 additions and 1 deletions
+20
View File
@@ -74,6 +74,26 @@ capabilities = { General = 1.0, Coding = 0.7, Reasoning = 0.6, Summarization = 0
# capabilities = { General = 1.0, Coding = 0.7, Reasoning = 0.6, Summarization = 0.8, ToolCalling = 0.5 }
# Router configuration (optional, defaults shown below)
[router]
conversation_keep_last = 6 # how many recent chat turns to keep in context
retrieval_k = 5 # L3 memory hits to retrieve per query
token_budget = 4096 # context budget for router prompts
# Sampling/length for router chat + steering replies.
[router.generation]
temperature = 0.7
top_p = 0.9
max_tokens = 512
# Router narration (the live workflow commentary). max_tokens is higher than chat so
# reasoning models can finish "thinking" and still emit the line; max_per_run caps how
# many narrations fire per workflow run.
[router.narration]
temperature = 0.7
top_p = 0.9
max_tokens = 1024
max_per_run = 100
[router.embedder]
backend = "noop" # or "llamacpp"
dimension = 1536