@@ -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 (
@@ -877,7 +877,7 @@ def test_stream_messages_with_input_json_delta(
877877 ),
878878 )
879879 returned_stream = Stream (
880- cast_to = RawMessageStreamEvent , response = response , client = client
880+ cast_to = MessageStreamEvent , response = response , client = client
881881 )
882882
883883 sentry_init (
@@ -1943,7 +1943,7 @@ def test_stream_messages_with_system_prompt(
19431943 ),
19441944 )
19451945 returned_stream = Stream (
1946- cast_to = RawMessageStreamEvent , response = response , client = client
1946+ cast_to = MessageStreamEvent , response = response , client = client
19471947 )
19481948
19491949 sentry_init (
@@ -3246,7 +3246,7 @@ def test_stream_messages_input_tokens_include_cache_read_streaming(
32463246 ),
32473247 )
32483248 returned_stream = Stream (
3249- cast_to = RawMessageStreamEvent , response = response , client = client
3249+ cast_to = MessageStreamEvent , response = response , client = client
32503250 )
32513251
32523252 sentry_init (integrations = [AnthropicIntegration ()], traces_sample_rate = 1.0 )
@@ -3394,7 +3394,7 @@ def test_stream_messages_cache_tokens(sentry_init, capture_events):
33943394 ),
33953395 )
33963396 returned_stream = Stream (
3397- cast_to = RawMessageStreamEvent , response = response , client = client
3397+ cast_to = MessageStreamEvent , response = response , client = client
33983398 )
33993399
34003400 sentry_init (integrations = [AnthropicIntegration ()], traces_sample_rate = 1.0 )
0 commit comments