mirror of
https://github.com/lukaszraczylo/mcp-captcharesolver.git
synced 2026-10-12 00:45:28 +00:00
Reasoning models prefix responses with <think>...</think> (or <thinking>...</thinking>) scratchpad that can itself contain a JSON-looking object. The brace-counting extractor would grab that inner object instead of the real answer. Strip think/thinking blocks via a package-level regexp before the balanced-object scan. Adds table cases covering both tag spellings while keeping the plain, prose-wrapped, and unbalanced cases intact.