From b0080202c8584bf5f048632e4c15c47a59c4ffb3 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Wed, 18 Feb 2026 20:19:34 -0800 Subject: [PATCH] add onStatus callback to streaming enrichment --- ui/litellm-dashboard/src/components/networking.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/networking.tsx b/ui/litellm-dashboard/src/components/networking.tsx index 7055f1e44be..0acae1c2e8f 100644 --- a/ui/litellm-dashboard/src/components/networking.tsx +++ b/ui/litellm-dashboard/src/components/networking.tsx @@ -5602,7 +5602,8 @@ export const enrichPolicyTemplateStream = async ( guardrailDefinitions: any[]; }) => void, onError?: (error: string) => void, - options?: { instruction?: string; existingCompetitors?: string[] } + options?: { instruction?: string; existingCompetitors?: string[] }, + onStatus?: (message: string) => void ) => { const url = proxyBaseUrl ? `${proxyBaseUrl}/policy/templates/enrich/stream` @@ -5647,6 +5648,8 @@ export const enrichPolicyTemplateStream = async ( const event = JSON.parse(line.slice(6)); if (event.type === "competitor") { onCompetitor(event.name); + } else if (event.type === "status") { + onStatus?.(event.message); } else if (event.type === "done") { onDone(event); } else if (event.type === "error") {