feat(server): wire EmbeddingRelevanceScorer into context builder, default level 4

Move embedder construction ahead of the engines so the context pack builder ranks
freeform turns by query relevance (query-conditioned selection). Default
compression_level 4 (format + static cache + token pruning + age-tiering) for a 12b
on a 16k window.
This commit is contained in:
2026-07-01 14:33:00 +04:00
parent 047e2a4070
commit e3743835ec
3 changed files with 9 additions and 4 deletions
@@ -624,7 +624,7 @@ object ConfigLoader {
asInt(orchestrationSection["journal_compaction_token_threshold"], 2_000),
resumeAbandonedMaxAgeMinutes =
asLong(orchestrationSection["resume_abandoned_max_age_minutes"], 1_440),
compressionLevel = asInt(orchestrationSection["compression_level"], 2),
compressionLevel = asInt(orchestrationSection["compression_level"], 4),
tokenPrunerUrl =
asString(orchestrationSection["token_pruner_url"], "http://127.0.0.1:8199"),
)
@@ -64,9 +64,10 @@ data class OrchestrationKnobs(
/**
* Context compression pipeline level (docs/plans/correx-compression-pipeline.md §5), additive
* 1..9. Default 2 = free format-compress + static cache. Raise toward the 16k wall; ≥3 needs
* the LLMLingua-2 sidecar at [tokenPrunerUrl] (fails open if absent).
* the LLMLingua-2 sidecar at [tokenPrunerUrl] (fails open if absent). Default 4 = format +
* static cache + token pruning + age-tiering, sized for a 12b on a 16k window.
*/
val compressionLevel: Int = 2,
val compressionLevel: Int = 4,
val tokenPrunerUrl: String = "http://127.0.0.1:8199",
)