Skip to content

fix(cohere): support chat stream context managers#418

Merged
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-fix-doc-962-cohere-stream-context
May 13, 2026
Merged

fix(cohere): support chat stream context managers#418
Abhijeet Prasad (AbhiPrasad) merged 1 commit into
mainfrom
abhi-fix-doc-962-cohere-stream-context

Conversation

@AbhiPrasad
Copy link
Copy Markdown
Member

Delegate Cohere chat_stream enter/exit handling through the traced stream wrapper so native with-statement usage keeps working while spans still finish correctly.

Add VCR regression coverage for ClientV2.chat_stream used as a context manager.

resolves https://linear.app/braintrustdata/issue/BT-5179/braintrust-python-sdk-cohere-wrapper-chat-stream-doesnt-support-with

Delegate Cohere chat_stream enter/exit handling through the traced stream wrapper so native with-statement usage keeps working while spans still finish correctly.

Add VCR regression coverage for ClientV2.chat_stream used as a context manager.
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) merged commit 3b1449c into main May 13, 2026
82 checks passed
@AbhiPrasad Abhijeet Prasad (AbhiPrasad) deleted the abhi-fix-doc-962-cohere-stream-context branch May 13, 2026 13:40
Abhijeet Prasad (AbhiPrasad) added a commit that referenced this pull request May 13, 2026
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.

2 participants