Skip to content

do not pass processed model

f88357c
Select commit
Loading
Failed to load commit list.
Merged

feat(anthropic): Emit AI Client Spans for synchronous messages.stream() #5565

do not pass processed model
f88357c
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden completed Mar 13, 2026 in 6m 58s

4 issues

Low

Test missing GEN_AI_SYSTEM assertion - `tests/integrations/anthropic/test_anthropic.py:417-422`

The new test_stream_messages test is missing the assertion assert span["data"][SPANDATA.GEN_AI_SYSTEM] == "anthropic" which is present in the similar test_streaming_create_message test (line 306) and other streaming tests. This reduces test coverage - if the integration stops setting the system identifier, this test won't catch it.

Also found at:

  • tests/integrations/anthropic/test_anthropic.py:1791-1794
Malformed comment from copy-paste error - `tests/integrations/anthropic/test_anthropic.py:2919`

The comment on line 2919 contains a copy-paste error: 'test_stream_messages_input_tokens_include_cache_read_streaming' was accidentally included instead of the expected value '2865'. This appears to be leftover from when the new test function was created. The comment should match line 2985 which correctly states '= 2865'.

Test missing assertion for GEN_AI_SYSTEM span attribute - `tests/integrations/anthropic/test_anthropic.py:418-423`

The new test_stream_messages test omits the assertion for SPANDATA.GEN_AI_SYSTEM == "anthropic" that exists in the similar test_streaming_create_message test (line 306). Since _set_common_input_data sets this attribute, the test should verify it is correctly populated to ensure parity with the existing streaming test coverage.

Also found at:

  • tests/integrations/anthropic/test_anthropic.py:438-439
Comment contains function name instead of expected value - `tests/integrations/anthropic/test_anthropic.py:2919`

The comment at line 2919 was corrupted during editing. It reads # input_tokens should be total: 19 + 2846 = test_stream_messages_input_tokens_include_cache_read_streaming but should read # input_tokens should be total: 19 + 2846 = 2865. This appears to be a copy-paste error where the function name replaced the numeric result. While not a runtime bug, it creates misleading documentation.

4 skills analyzed
Skill Findings Duration Cost
code-review 2 3m 31s $2.08
find-bugs 2 6m 50s $3.00
skill-scanner 0 1m 34s $0.65
security-review 0 2m 18s $0.86

Duration: 14m 13s · Tokens: 4.1M in / 47.1k out · Cost: $6.62 (+extraction: $0.01, +merge: $0.00, +fix_gate: $0.01)