Repository navigation
feat(anthropic): Record reasoning parts in streaming output - #8193
Conversation
Coverage Results 📊✅ 137214 passed | ⏭️ 7456 skipped | Total: 144670 | Pass Rate: 94.85% | Execution Time: 453m 42s 📊 Comparison with Base Branch
✨ Test counts unchanged from base. All tests are passing successfully. ✅ Patch coverage is 93.75% (15 of 16 changed executable lines covered; target 80%). Changed files with executable lines (1)
Coverage diff@@ Coverage Diff @@
## master #8193 +/-##
==========================================
Coverage 90.29% 90.29% —%
==========================================
Files 203 203 —
Tracked lines 26910 26922 +12
Branches 10050 10056 +6
==========================================
+ Hits 24298 24309 +11
- Misses 2612 2613 +1
- Partials 1518 1519 +1Generated by Coverage Action |
4f7812f to
510b381
Compare
a5d6045 to
224885d
Compare
3bc6734 to
09b45de
Compare
…ntry/sentry-python into webb/anthropic/streaming-reasoning
09b45de to
dcfcd0c
Compare
| delta = event.delta | ||
| if ThinkingDelta is not None and isinstance(delta, ThinkingDelta): | ||
| content_blocks[-1]["thinking"] += delta.thinking | ||
| elif hasattr(event.delta, "text"): |
There was a problem hiding this comment.
The hasattr() and getattr() are leftovers from existing code, and new stuff uses types.
7dce4f1 to
77eebbe
Compare
77eebbe to
fc69b80
Compare
d0e76af to
02923b0
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 02923b0. Configure here.
02923b0 to
1356704
Compare

Description
Accumulate thinking output in the same format as the nonstreaming path so
_set_output_data()can format the thinking parts as reasoning parts that the product understands.Issues
Reminders
uv run ruff.feat:,fix:,ref:,meta:)