From aedcfeda9fe8fdaf3d83996182f8fcd71484f107 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sun, 3 May 2026 15:52:02 -0400 Subject: [PATCH] docs: improve model-router prose (cascade-lookup explanation, skill registration rationale) --- org/system-model-router.org | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/org/system-model-router.org b/org/system-model-router.org index c805776..26ae2c9 100644 --- a/org/system-model-router.org +++ b/org/system-model-router.org @@ -113,8 +113,12 @@ Pluggable — set ~*complexity-classifier*~ to override. ** Cascade Lookup -Finds the first ~(provider . model)~ entry in a cascade matching the -current backend keyword. Case-insensitive. +The core iterates each backend in ~*provider-cascade*~ and calls the model +selector for each one. This function matches the current backend against the +per-slot cascade list to find the appropriate model. Returns the first +~:code~ ~(provider . model)~ entry whose provider matches, or ~nil~ if +the backend has no entry in that slot's cascade (the core will skip to +the next provider). ;; REPL-VERIFIED: 2026-05-03T14:00:00 #+begin_src lisp @@ -192,7 +196,11 @@ Reads cascade configuration from environment variables and registers ** Skill Registration -Triggers on nothing (observer). Initialization happens at load time. +The model router is an observer skill — it has no trigger and no +deterministic gate. All work happens at load time via ~model-router-init~, +which reads env vars and registers into the core ~*model-selector*~ hook. +The ~defskill~ call exists only to register metadata (priority, name) for +telemetry and lifecycle management. #+begin_src lisp (defskill :passepartout-model-router @@ -205,3 +213,5 @@ Triggers on nothing (observer). Initialization happens at load time. #+begin_src lisp (model-router-init) #+end_src + +