From 4fdb9fd0c7ea5b4f706aadb703ab13471e6c0f72 Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 16 Jun 2026 22:15:54 -0400 Subject: [PATCH] feat: add janitor role to model registry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds 'janitor' as a required system role alongside chat/orchestrator/distill. Appears in the Model Registry UI so a cheap/fast model (Haiku, local Gemma) can be assigned for upcoming session checkpoint compaction feature. ROLE_DEFAULT_TOOLS: [] — no tools, pure text processing _ROLE_LAST_RESORT: claude_cli fallback until a dedicated model is assigned Co-Authored-By: Claude Sonnet 4.6 --- cortex/model_registry.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cortex/model_registry.py b/cortex/model_registry.py index 7ce23ac..e670a00 100644 --- a/cortex/model_registry.py +++ b/cortex/model_registry.py @@ -90,6 +90,7 @@ logger = logging.getLogger(__name__) # "orchestrator" is intentionally absent — Phase 2 keyword routing narrows it per message. ROLE_DEFAULT_TOOLS: dict[str, list[str] | None] = { "distill": [], # pure text processing — no tools needed + "janitor": [], # session compaction — no tools needed "research": ["web_search", "web_read", "http_fetch"], "coder": [ "project_file_read", "project_file_list", "file_stat", "file_grep", @@ -172,13 +173,14 @@ _ROLE_LAST_RESORT: dict[str, str] = { "chat": "claude_cli", "orchestrator": "gemini_api", "distill": "claude_cli", + "janitor": "claude_cli", # assign Haiku or a local model for cost savings "coder": "claude_cli", "research": "gemini_api", } PRIORITY_KEYS = ["primary", "backup_1", "backup_2", "backup_3", "backup_4"] -REQUIRED_ROLES: list[str] = ["chat", "orchestrator", "distill"] +REQUIRED_ROLES: list[str] = ["chat", "orchestrator", "distill", "janitor"] # ── Storage ───────────────────────────────────────────────────────────────────