From ee20bd993019b8c37ab48c4229b3bdb97da2fe63 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 14 May 2026 09:36:13 -0600 Subject: [PATCH] Propogate streaming token stats to chat calls --- frigate/api/chat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frigate/api/chat.py b/frigate/api/chat.py index 7b450bac74..83d2f503c6 100644 --- a/frigate/api/chat.py +++ b/frigate/api/chat.py @@ -1411,6 +1411,11 @@ When a user refers to a specific object they have seen or describe with identify ) + b"\n" ) + elif kind == "stats": + yield ( + json.dumps({"type": "stats", **value}).encode("utf-8") + + b"\n" + ) elif kind == "message": msg = value if msg.get("finish_reason") == "error":