"The smartest router has no opinions. It reads which adapter owns the model and gets out of the way."
The Router's Job, Stated Minimally
When a generate request arrives naming a model, something has to decide: does this go to the LocalAdapter or the APIAdapter? The naive version of that decision is a function full of branches — if the model name starts with this, if it's in that folder, if it matches these patterns. Every new model or vendor adds another branch. That function becomes the place bugs live and the place nobody wants to touch.
Move the Decision Into Data
The better design moves the decision out of code and into the registry. Each model has a registry row, and that row already knows which adapter owns it. The router then becomes trivial: look up the model's row, read its adapter, dispatch. No branches, no patterns, no growing if/else. The router has no opinions because the registry already holds the answer.
Why 'Dumb' Is the Compliment
A dumb router is one you never have to modify. Add a new local checkpoint? It gets a registry row tagged 'local' during the scan; the router already knows what to do with it. Add a new API vendor? Its models get rows tagged for the APIAdapter; the router already knows. The router was written once, correctly, and never needs to change again because all the variation lives in the data it reads. Dumbness here means stability.
The Registry Is the Single Source of Truth
This design has a second payoff: there's exactly one place that knows the model-to-adapter mapping, and it's the registry. You never have routing logic in two places that can disagree. Want to know why a model routed where it did? Read its registry row. Want to change the routing? Change the row. One source of truth, queryable and editable, instead of decision logic scattered across a router, a config file, and three special cases.