@@ -220,8 +220,8 @@ def test_streaming_create_message(
220220 capture_events ,
221221 send_default_pii ,
222222 include_prompts ,
223- server_side_event_chunks ,
224223 get_model_response ,
224+ server_side_event_chunks ,
225225):
226226 client = Anthropic (api_key = "z" )
227227
@@ -335,8 +335,8 @@ async def test_streaming_create_message_async(
335335 send_default_pii ,
336336 include_prompts ,
337337 async_iterator ,
338- server_side_event_chunks ,
339338 get_model_response ,
339+ server_side_event_chunks ,
340340):
341341 client = AsyncAnthropic (api_key = "z" )
342342
@@ -455,8 +455,8 @@ def test_streaming_create_message_with_input_json_delta(
455455 capture_events ,
456456 send_default_pii ,
457457 include_prompts ,
458- server_side_event_chunks ,
459458 get_model_response ,
459+ server_side_event_chunks ,
460460):
461461 client = Anthropic (api_key = "z" )
462462
@@ -607,8 +607,8 @@ async def test_streaming_create_message_with_input_json_delta_async(
607607 send_default_pii ,
608608 include_prompts ,
609609 async_iterator ,
610- server_side_event_chunks ,
611610 get_model_response ,
611+ server_side_event_chunks ,
612612):
613613 client = AsyncAnthropic (api_key = "z" )
614614 response = get_model_response (
@@ -1300,8 +1300,8 @@ def test_streaming_create_message_with_system_prompt(
13001300 capture_events ,
13011301 send_default_pii ,
13021302 include_prompts ,
1303- server_side_event_chunks ,
13041303 get_model_response ,
1304+ server_side_event_chunks ,
13051305):
13061306 """Test that system prompts are properly captured in streaming mode."""
13071307 client = Anthropic (api_key = "z" )
@@ -1431,8 +1431,8 @@ async def test_streaming_create_message_with_system_prompt_async(
14311431 send_default_pii ,
14321432 include_prompts ,
14331433 async_iterator ,
1434- server_side_event_chunks ,
14351434 get_model_response ,
1435+ server_side_event_chunks ,
14361436):
14371437 """Test that system prompts are properly captured in streaming mode (async)."""
14381438 client = AsyncAnthropic (api_key = "z" )
@@ -2444,7 +2444,10 @@ def test_input_tokens_include_cache_read_nonstreaming(sentry_init, capture_event
24442444
24452445
24462446def test_input_tokens_include_cache_read_streaming (
2447- sentry_init , capture_events , server_side_event_chunks , get_model_response
2447+ sentry_init ,
2448+ capture_events ,
2449+ get_model_response ,
2450+ server_side_event_chunks ,
24482451):
24492452 """
24502453 Test that gen_ai.usage.input_tokens includes cache_read tokens (streaming).
@@ -2546,7 +2549,10 @@ def test_input_tokens_unchanged_without_caching(sentry_init, capture_events):
25462549
25472550
25482551def test_cache_tokens_streaming (
2549- sentry_init , capture_events , server_side_event_chunks , get_model_response
2552+ sentry_init ,
2553+ capture_events ,
2554+ get_model_response ,
2555+ server_side_event_chunks ,
25502556):
25512557 """Test cache tokens are tracked for streaming responses."""
25522558 client = Anthropic (api_key = "z" )
0 commit comments