From 806b735a1b9914e672ab79db9f0a2dd7d2676263 Mon Sep 17 00:00:00 2001 From: Open Source Contributor Date: Sun, 19 Apr 2026 15:33:18 -0600 Subject: [PATCH] fix: properly handle thinking blocks in streaming and tool call detection 1. Streaming loop: Check for thinking blocks BEFORE detecting - Strip thinking from check_content to avoid false detection - This prevents premature truncation when thinking blocks contain fake tags 2. Post-streaming: Fix thinking removal with proper regex - Replace broken loop with: accumulated = re.sub(r']*>.*?', '', accumulated, flags=re.DOTALL) 3. utils.py: Handle single quotes in parameter name detection - Added