Skip to content

fix(anthropic): log stop reason in span output#185

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-fix-175-anthropic-stop-reason
Apr 1, 2026
Merged

fix(anthropic): log stop reason in span output#185
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-fix-175-anthropic-stop-reason

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

Include Anthropic message model, stop_reason, and stop_sequence in the logged span output so spans preserve the model stop metadata returned by the API. Add a focused regression test for _log_message_to_span and extend an existing VCR-backed integration test to assert the new fields.

Closes #175

Include Anthropic message model, stop_reason, and stop_sequence in the logged span output so spans preserve the model stop metadata returned by the API. Add a focused regression test for _log_message_to_span and extend an existing VCR-backed integration test to assert the new fields.

Closes #175
@starfolkai
Copy link
Copy Markdown
Contributor

starfolkai Bot commented Apr 1, 2026

Drop into this review session: sfk devbox connect pr-185-braintrust-sdk-python-cb9b --attach

No serious bugs or issues found 🎉

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 07eae20 into main Apr 1, 2026
29 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-fix-175-anthropic-stop-reason branch April 1, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Anthropic: stop_reason and stop_sequence not captured in span output

2 participants