Wire custom providers end-to-end (admin API, boot default, model picker) (#512)
The custom-provider subsystem (store, admin routes, runtime registry, catalog) existed but was unreachable in default production wiring. Three fixes: the server-deps assembly never passed the custom-provider store and refresher, so the admin API always 404'd — the assembly now lives next to buildApp so it cannot drift, and boot awaits the initial refresh; the boot default resolved the configured model eagerly before custom providers hydrated, so a configured custom model silently degraded to the built-in default forever — the configured model id is now passed raw and resolved lazily per call; and the web-ui picker only accepted dynamic catalog entries for the openrouter provider and threw for custom-provider slugs — any catalog-backed model now clones the dynamic template while keeping its own provider slug. An end-to-end boot-wiring test exercises production-shaped wiring from registration through the runtime-config advertisement. marcclefas-code **Deployment notes** Release-note the flip: configured custom models take effect after upgrade; orgs should verify their custom-provider config is actually valid Deliberate behavior flip (fixes public #269/#282/#333): a configured custom default model that previously degraded silently to the built-in default at boot is now resolved lazily and actually used — an org with stale/broken custom-provider config will see per-call failures where it silently got the default before Admin custom-providers API goes from always-404 to live (routes existed, deps were never wired); endpoints sit behind the existing admin auth index.ts now awaits refreshCustomProviders() at boot — one extra store read at startup, same database; no schema change <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/yc-software/codesmith/qm/pr/512"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1789253766&installation_model_id=19911&pr_number=512&repository=yc-software%2Fqm&return_to=https%3A%2F%2Fgithub.com%2Fyc-software%2Fqm%2Fpull%2F512&signature=34f21e17cbe84e50ffd55de6dac221392c2ffa43322e796594a6ec37ef0b67af"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer -->
R
Regan Bell committed
6879ed9159c9b6cd4b50fc527fa4d50c157bbce0
Parent: 6ee85e0
Committed by GitHub <noreply@github.com>
on 8/13/2026, 11:20:59 PM