Archibald312 builds the routing dial before turning it
GordonOSS lands a per-source model-routing layer ahead of the connectors that will need it - and pins the rules with tests before anyone can break them.
Most forks bolt on model routing once they have a mess of connectors to untangle. Archibald312 did it the other way around: build the decision layer first, with nullable preference fields on projects and documents, then let future connectors and a deferred local-inference adapter plug into the same spot. Precedence is explicit - document beats project beats request - and when those conflict, the system flags it rather than quietly picking one.
Every routing decision gets written to the audit log with a structured reason, reusing instrumentation an earlier phase already put in place. Unknown models are rejected loudly. Existing behaviour is untouched if no preferences are set, so the change is genuinely additive. The test coverage is heavier than the feature size warrants, which is the tell that this is meant to be load-bearing.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?