From 99458a6ced4d2859c1a599f9fca805d18baa32b9 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sat, 29 Aug 2026 23:10:07 +0300 Subject: [PATCH] avoid redundant review of stable local answers --- cmd/core-runtime/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/core-runtime/main.go b/cmd/core-runtime/main.go index 1774872..9f7d259 100644 --- a/cmd/core-runtime/main.go +++ b/cmd/core-runtime/main.go @@ -1032,7 +1032,11 @@ func main() { planningReply = memoryInstructionReply needsCognition = false } - if strings.TrimSpace(planningReply) != "" { + // Stable-knowledge answers have already passed the local cognitive + // route with compact, source-aware context. Re-reviewing the same answer + // serially can exhaust the household request budget on a loaded local + // provider and turn a valid answer into a degraded response. + if strings.TrimSpace(planningReply) != "" && !stableKnowledgeReply { reviewContext, cancelReview := context.WithTimeout(r.Context(), 12*time.Second) reviewedReply, reviewErr := cognitiveClient.ReviewResponse(reviewContext, session, utterance.Content, planningReply, gen2Context.Text, cognitive.TaskMeaning{ SpeechAct: string(semantic.Interpretation.SpeechAct),