diff --git a/packages/app/src/context/global-sync.tsx b/packages/app/src/context/global-sync.tsx index 594f94fb6218..96c4526da65c 100644 --- a/packages/app/src/context/global-sync.tsx +++ b/packages/app/src/context/global-sync.tsx @@ -422,7 +422,13 @@ function createGlobalSync() { const updateConfigMutation = useMutation(() => ({ mutationFn: (config: Config) => globalSDK.client.global.config.update({ config }), - onSuccess: () => bootstrap.refetch(), + onSuccess: () => { + bootstrap.refetch() + // Invalidate all provider queries so newly configured custom providers + // appear immediately in the available provider list across all directories. + queryClient.invalidateQueries({ queryKey: [null, "providers"] }) + queryClient.invalidateQueries({ predicate: (query) => query.queryKey[1] === "providers" }) + }, })) return {