@@ -13,7 +13,7 @@ async def __call__(self, *args, **kwargs):
1313
1414
1515from anthropic import Anthropic , AnthropicError , AsyncAnthropic , AsyncStream , Stream
16- from anthropic .types import MessageDeltaUsage , TextDelta , Usage , RawMessageStreamEvent
16+ from anthropic .types import MessageDeltaUsage , TextDelta , Usage , MessageStreamEvent
1717from anthropic .types .content_block_delta_event import ContentBlockDeltaEvent
1818from anthropic .types .content_block_start_event import ContentBlockStartEvent
1919from anthropic .types .content_block_stop_event import ContentBlockStopEvent
@@ -375,7 +375,7 @@ def test_stream_messages(
375375 ),
376376 )
377377 returned_stream = Stream (
378- cast_to = RawMessageStreamEvent , response = response , client = client
378+ cast_to = MessageStreamEvent , response = response , client = client
379379 )
380380
381381 sentry_init (
@@ -764,7 +764,7 @@ def test_stream_messages_with_input_json_delta(
764764 ),
765765 )
766766 returned_stream = Stream (
767- cast_to = RawMessageStreamEvent , response = response , client = client
767+ cast_to = MessageStreamEvent , response = response , client = client
768768 )
769769
770770 sentry_init (
@@ -1677,7 +1677,7 @@ def test_stream_messages_with_system_prompt(
16771677 ),
16781678 )
16791679 returned_stream = Stream (
1680- cast_to = RawMessageStreamEvent , response = response , client = client
1680+ cast_to = MessageStreamEvent , response = response , client = client
16811681 )
16821682
16831683 sentry_init (
@@ -2855,7 +2855,7 @@ def test_stream_messages_input_tokens_include_cache_read_streaming(
28552855 ),
28562856 )
28572857 returned_stream = Stream (
2858- cast_to = RawMessageStreamEvent , response = response , client = client
2858+ cast_to = MessageStreamEvent , response = response , client = client
28592859 )
28602860
28612861 sentry_init (integrations = [AnthropicIntegration ()], traces_sample_rate = 1.0 )
@@ -3003,7 +3003,7 @@ def test_stream_messages_cache_tokens(sentry_init, capture_events):
30033003 ),
30043004 )
30053005 returned_stream = Stream (
3006- cast_to = RawMessageStreamEvent , response = response , client = client
3006+ cast_to = MessageStreamEvent , response = response , client = client
30073007 )
30083008
30093009 sentry_init (integrations = [AnthropicIntegration ()], traces_sample_rate = 1.0 )
0 commit comments