fix(provider): refresh models in background

This commit is contained in:
Aiden Cline 2026-06-11 20:30:14 -05:00
commit 72244e9e09
6 changed files with 112 additions and 37 deletions

View file

@ -375,6 +375,12 @@ export function createServerSyncContextInner(_serverSDK?: ServerSDK) {
const event = e.details
const recent = bootingRoot || Date.now() - bootedAt < 1500
if (event.type === "provider.models.updated") {
void queryClient.invalidateQueries({
predicate: (query) => query.queryKey[0] === serverSDK.scope && query.queryKey[2] === "providers",
})
}
if (directory === "global") {
applyGlobalEvent({
event,