refresh models

This commit is contained in:
2026-02-25 01:55:35 +00:00
parent 0226608d8f
commit 21fde3d989
3 changed files with 37 additions and 2 deletions
@@ -361,6 +361,13 @@ piMonoRouter.put('/access-policy', async (ctx) => {
return ctx.json({ ok: true });
});
piMonoRouter.post('/local-providers/refresh', async (ctx) => {
await syncLocalProvidersToPiConfig();
syncAllUserPiConfigs().catch(() => {});
invalidateModelCache();
return ctx.json({ ok: true });
});
piMonoRouter.get('/local-providers/health', async (ctx) => {
const providers = await readLocalProviders();
const results: Record<string, boolean> = {};