pipeline-moe 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipeline-moe",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "description": "Local-first multi-agent chat room — N stateful pi agent sessions over a shared workspace, with terminal and web clients.",
6
6
  "license": "MIT",
package/src/server.ts CHANGED
@@ -665,23 +665,14 @@ async function main(): Promise<void> {
665
665
  // ── Providers ──────────────────────────────────────────────────────────────
666
666
 
667
667
  // List all known providers with their auth status (no secrets exposed).
668
- app.get("/api/providers", (_req, res) => {
669
- const allModels = resolved.modelRegistry.getAll()
670
- const providerSet = new Set(allModels.map((m) => m.provider))
671
- const providers = Array.from(providerSet).map((name) => {
672
- const authStatus = resolved.modelRegistry.getProviderAuthStatus(name)
673
- const models = allModels
674
- .filter((m) => m.provider === name)
675
- .map((m) => ({ id: m.id, name: (m as { name?: string }).name ?? m.id }))
676
- return {
677
- name,
678
- displayName: resolved.modelRegistry.getProviderDisplayName(name),
679
- ...authStatus,
680
- explicitlyEnabled: explicitlyEnabledProviders.has(name),
681
- models,
682
- }
668
+ // Uses the same builder as the SSE "providers" broadcast a REST-only
669
+ // duplicate here once shipped without supportsOAuth, so clients fetching
670
+ // over REST offered an API-key prompt for OAuth-capable providers.
671
+ app.get("/api/providers", async (_req, res) => {
672
+ res.json({
673
+ providers: await getProviderList(resolved, explicitlyEnabledProviders),
674
+ explicitlyEnabled: Array.from(explicitlyEnabledProviders),
683
675
  })
684
- res.json({ providers, explicitlyEnabled: Array.from(explicitlyEnabledProviders) })
685
676
  })
686
677
 
687
678
  // Set an API key for a provider (persisted to auth.json).