llm: drop model/agent scope matching; add instance-wide compaction model picker
Nightly Build / build (push) Successful in 6m50s

Remove the scope system end-to-end (llm_models.scope column, agent meta
scope field, scope-based tier in model selection, UI checkboxes/pills):
it was only a soft ranking hint, had drifted (6 UI scopes vs 3 used by
agents, 'general' not even selectable) and duplicated what strength
already decides. Strength stays the single AUTO-selection axis.

Compaction: the summary model is now pickable from the Settings page
via a new PropertyType::LlmModel config property (registry key
compaction_model), instance-wide and live (no restart). Fallback chain:
explicit pick -> compaction.strength from config.yml -> priority order;
a deleted configured model degrades to AUTO. ContextCompactor reads the
key at compact time through GlobalConfigManager.
This commit is contained in:
2026-07-25 10:48:09 +01:00
parent 9dafc4bfaa
commit 5081ec2afe
39 changed files with 174 additions and 160 deletions
+1
View File
@@ -331,6 +331,7 @@ impl Conversation {
cfg.clone(),
Arc::clone(&models.llm_manager),
Arc::clone(&rt.event_bus),
Arc::clone(&rt.config),
))
});
if compactor.is_none() {
+5 -1
View File
@@ -63,7 +63,11 @@ impl Runtime {
users,
sessions,
config,
config_properties: vec![crate::i18n::config_set(), crate::tic::config_set()],
config_properties: vec![
crate::i18n::config_set(),
crate::tic::config_set(),
crate::compactor::config_set(),
],
system_bus,
event_bus,
global_tx,
@@ -43,6 +43,7 @@ use crate::chat_hub::ChatHub;
use crate::clarification::ClarificationManager;
use crate::compactor::ContextCompactor;
use crate::config::{CompactionConfig, CoreConfig, DatetimeConfig};
use crate::config_store::GlobalConfigManager;
use crate::container::ContainerManager;
use crate::cron::TaskManager;
use crate::elicitation::ElicitationManager;
@@ -132,6 +133,7 @@ pub(super) struct UserContextFactory {
event_bus: Arc<ChatEventBus>,
supervisor: Arc<super::supervisor::TaskSupervisor>,
shutdown_token: CancellationToken,
config_store: Arc<GlobalConfigManager>,
max_history_messages: usize,
max_tool_rounds: usize,
max_parallel_subagents: usize,
@@ -166,6 +168,7 @@ impl UserContextFactory {
event_bus: Arc::clone(&rt.event_bus),
supervisor: Arc::clone(&rt.supervisor),
shutdown_token: rt.shutdown_token.clone(),
config_store: Arc::clone(&rt.config),
max_history_messages: config.llm.max_history_messages,
max_tool_rounds: config.llm.max_tool_rounds.unwrap_or(DEFAULT_MAX_TOOL_ROUNDS),
max_parallel_subagents: config.llm.max_parallel_subagents.unwrap_or(DEFAULT_MAX_PARALLEL_SUBAGENTS),
@@ -207,6 +210,7 @@ impl UserContextFactory {
cfg.clone(),
Arc::clone(&self.llm_manager),
Arc::clone(&event_bus),
Arc::clone(&self.config_store),
))
});