lazy load LLMs even harder

This commit is contained in:
Dax Raad
2025-05-31 16:05:12 -04:00
parent 3b746162d2
commit f072ab3276
8 changed files with 202 additions and 194 deletions

View File

@@ -268,12 +268,8 @@ export namespace Server {
},
}),
async (c) => {
const providers = await LLM.providers()
const result = [] as (Provider.Info & { key: string })[]
for (const [key, provider] of Object.entries(providers)) {
result.push({ ...provider.info, key })
}
return c.json(result)
const providers = await Provider.active()
return c.json(providers.values().toArray())
},
)