diff --git a/apps/ai-bot/router.go b/apps/ai-bot/router.go index 59cc41c0..8058e5bc 100644 --- a/apps/ai-bot/router.go +++ b/apps/ai-bot/router.go @@ -118,6 +118,14 @@ func (b *Bot) classify(ctx context.Context, body, rcx string, cost *CostBreakdow if !b.cfg.RouterClassifierEnabled || b.gemini == nil { return d } + // Emit the exact conversation window handed to the classifier — its INPUT, which the + // truncated llm-exchange body log cuts off (the static prompt fills the ~4 KB cap before + // rcx). Gated by the LOG_BODIES_USERS verbose flag exactly like logLLMExchange, since rcx + // carries user content. This is the only way to tell a real misclassification apart from + // a context-starvation problem (empty/insufficient rcx) when about_project misfires. + if ri, ok := reqInfoFromContext(ctx); ok && ri.verbose { + b.log.DebugContext(ctx, "router context", "rcx", rcx) + } // 4s router sub-deadline derived from genCtx (a budget cancel still propagates). rctx, cancel := context.WithTimeout(ctx, routerStageTimeout) defer cancel()