fix: Handle assistant wrapper pattern in streaming responses
- Detect and unwrap responses wrapped in 'assistant: [{"type": "text", "text": "..."}]' format
- Use extracted text for response content instead of raw accumulated text
- Fix variable scoping issue with tool_match variable
- Update token counting to use final_text when available
Showing
Please
register
or
sign in
to comment