You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Frontier reasoning models and local thinking models (such as DeepSeek-R1, QwQ, Gemma) emit <think>...</think> tokens in streaming SSE responses. Currently, thinking blocks can leak into raw review comments or markdown reports if not cleanly separated from final response payloads. Additionally, unbounded SSE streams can cause memory exhaustion without strict MAX_STREAM_BYTES (50MB) guards.
Proposed Changes
Implement a standardized streaming token processor in devops_cli.ai.client.
Extract <think> blocks into a structured reasoning scratchpad buffer while streaming clean markdown to the user.
Enforce strict MAX_STREAM_BYTES (50MB) stream boundaries and handle SSE reconnects.
Support thinking tag extraction across Ollama, Anthropic, and OpenAI streaming formats.
Acceptance Criteria
Zero leakage of raw <think> tags into final markdown report artifacts or PR comments.
Structured access to agent reasoning scratchpad.
Comprehensive unit tests in tests/test_ai_streaming.py.
Activity
feat(ai): streaming reasoning think token parser and bounded stream s…
feat(release): v0.2.19 (#217)