From ad4a1e89d5d91fbc6af4fff63866b5675d8a4cfd Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Fri, 10 Apr 2026 09:23:46 +0000 Subject: [PATCH] fix: revert to kickoff (stream not available on Agent) --- src/backend/app/services/ai_agent/conversational.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/backend/app/services/ai_agent/conversational.py b/src/backend/app/services/ai_agent/conversational.py index 152be2b..2f2f063 100644 --- a/src/backend/app/services/ai_agent/conversational.py +++ b/src/backend/app/services/ai_agent/conversational.py @@ -133,13 +133,11 @@ class ConversationalAgent: Returns: Dict with 'response' (the assistant's reply), 'thinking' (reasoning), and 'strategy_updated' (bool) """ - # Execute agent using stream to capture both thinking and output + # Execute agent using kickoff try: - # Use stream instead of kickoff to get thinking content - result = self.agent.stream(user_message) + result = self.agent.kickoff(user_message) - # In stream mode, result contains both output and thinking - # Extract thinking from the result if available + # Try to extract thinking from result if available thinking = None if hasattr(result, 'thinking') and result.thinking: thinking = result.thinking