feat: add janitor role to model registry

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 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-16 22:15:54 -04:00
parent 167ca235b5
commit 4fdb9fd0c7

View File

@@ -90,6 +90,7 @@ logger = logging.getLogger(__name__)
# "orchestrator" is intentionally absent — Phase 2 keyword routing narrows it per message. # "orchestrator" is intentionally absent — Phase 2 keyword routing narrows it per message.
ROLE_DEFAULT_TOOLS: dict[str, list[str] | None] = { ROLE_DEFAULT_TOOLS: dict[str, list[str] | None] = {
"distill": [], # pure text processing — no tools needed "distill": [], # pure text processing — no tools needed
"janitor": [], # session compaction — no tools needed
"research": ["web_search", "web_read", "http_fetch"], "research": ["web_search", "web_read", "http_fetch"],
"coder": [ "coder": [
"project_file_read", "project_file_list", "file_stat", "file_grep", "project_file_read", "project_file_list", "file_stat", "file_grep",
@@ -172,13 +173,14 @@ _ROLE_LAST_RESORT: dict[str, str] = {
"chat": "claude_cli", "chat": "claude_cli",
"orchestrator": "gemini_api", "orchestrator": "gemini_api",
"distill": "claude_cli", "distill": "claude_cli",
"janitor": "claude_cli", # assign Haiku or a local model for cost savings
"coder": "claude_cli", "coder": "claude_cli",
"research": "gemini_api", "research": "gemini_api",
} }
PRIORITY_KEYS = ["primary", "backup_1", "backup_2", "backup_3", "backup_4"] 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 ─────────────────────────────────────────────────────────────────── # ── Storage ───────────────────────────────────────────────────────────────────