gsxdsm
fe5a595984
FN-7622: unify desktop and CLI provider seeding to fix truncated provider list
The Electron desktop app's in-process dashboard server skipped the CLI's provider seeding sequence, so /api/providers and /api/models returned a truncated catalog (missing built-in API-key providers and user customProviders[]) compared to the identical config on the web build.
- Move provider-auth.ts and custom-provider-registry.ts from @fusion/cli into @fusion/engine as the single shared implementation
- Add engine/src/provider-registration.ts exposing seedDashboardProviders(), mirroring the CLI's exact startup order (built-in Zai provider registration -> wrapAuthStorageWithApiKeyProviders -> model merge/refresh -> registerCustomProviders -> settings:updated resubscription)
- Update desktop/src/local-runtime.ts and local-server.ts to call the shared seedDashboardProviders() helper instead of constructing a raw authStorage/modelRegistry
- Convert packages/cli/src/commands/provider-auth.ts and custom-provider-registry.ts into re-export shims preserving unchanged observable behavior
- Add engine/src/__tests__/provider-registration.test.ts and expand desktop local-runtime/local-server tests to cover the shared seeding path
- Add changeset for @runfusion/fusion (patch)
Files changed:
.changeset/fn-7622-desktop-provider-parity.md | 7 +
.../cli/src/commands/custom-provider-registry.ts | 122 +----
packages/cli/src/commands/provider-auth.ts | 517 +--------------------
.../desktop/src/__tests__/local-runtime.test.ts | 93 ++++
.../desktop/src/__tests__/local-server.test.ts | 62 ++-
packages/desktop/src/local-runtime.ts | 33 +-
packages/desktop/src/local-server.ts | 21 +-
.../src/__tests__/provider-registration.test.ts | 192 ++++++++
packages/engine/src/custom-provider-registry.ts | 117 +++++
packages/engine/src/index.ts | 18 +
packages/engine/src/provider-auth.ts | 513 ++++++++++++++++++++
packages/engine/src/provider-registration.ts | 105 +++++
12 files changed, 1172 insertions(+), 628 deletions(-)
Fusion-Task-Id: FN-7622
Fusion-Task-Lineage: fb6fbbf3-745e-4623-b7af-11471e13f138
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-07-07 22:04:51 -07:00
..
2026-07-06 19:03:06 -07:00
2026-07-01 07:33:56 -07:00
2026-04-08 13:31:07 -07:00
2026-04-23 23:02:36 -07:00
2026-04-14 12:45:15 -07:00
2026-05-04 23:47:26 -07:00
2026-05-20 20:05:08 -07:00
2026-06-03 17:22:11 -07:00
2026-05-17 22:47:53 -07:00
2026-04-28 18:23:21 -07:00
2026-04-23 15:53:47 -07:00
2026-04-23 23:02:36 -07:00
2026-07-07 22:04:51 -07:00
2026-06-30 01:23:09 -07:00
2026-05-26 21:57:31 -07:00
2026-07-02 20:16:42 -07:00
2026-05-11 21:48:26 -07:00
2026-07-03 08:13:06 -07:00
2026-05-01 12:21:52 -07:00
2026-05-23 04:18:55 -07:00
2026-05-14 04:42:32 -07:00
2026-04-23 23:02:36 -07:00
2026-05-29 08:25:38 -07:00
2026-06-06 01:01:24 -07:00
2026-05-04 23:59:52 -07:00
2026-06-25 23:34:07 -07:00
2026-05-09 14:41:58 -07:00
2026-05-13 21:41:14 -07:00
2026-06-03 22:31:23 -07:00
2026-04-28 23:23:34 -07:00
2026-06-01 18:52:28 -07:00
2026-06-13 23:20:06 -07:00
2026-06-01 19:40:28 -07:00
2026-06-14 15:29:35 -07:00
2026-06-03 09:25:56 -07:00
2026-04-10 12:47:46 -07:00
2026-06-13 06:12:09 -07:00
2026-06-27 21:39:40 -07:00
2026-07-07 22:04:51 -07:00
2026-06-11 09:51:49 -07:00
2026-05-13 06:29:36 -07:00
2026-04-26 00:00:49 -07:00
2026-06-30 01:23:09 -07:00
2026-04-08 11:00:32 -07:00
2026-06-05 01:53:42 -07:00
2026-06-04 23:41:30 -07:00
2026-04-24 08:55:02 -07:00
2026-04-27 23:27:27 -07:00
2026-06-05 11:12:40 +10:00
2026-07-06 19:03:06 -07:00
2026-07-02 12:34:35 -07:00
2026-05-28 14:50:15 -07:00