Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/integrations/anthropic/test_anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ def test_stream_messages(

assert span["op"] == OP.GEN_AI_CHAT
assert span["description"] == "chat model"
assert span["data"][SPANDATA.GEN_AI_SYSTEM] == "anthropic"
assert span["data"][SPANDATA.GEN_AI_OPERATION_NAME] == "chat"
assert span["data"][SPANDATA.GEN_AI_REQUEST_MODEL] == "model"

Expand All @@ -437,6 +438,7 @@ def test_stream_messages(
assert span["data"][SPANDATA.GEN_AI_USAGE_OUTPUT_TOKENS] == 10
assert span["data"][SPANDATA.GEN_AI_USAGE_TOTAL_TOKENS] == 20
assert span["data"][SPANDATA.GEN_AI_RESPONSE_STREAMING] is True
assert span["data"][SPANDATA.GEN_AI_RESPONSE_ID] == "msg_01XFDUDYJgAACzvnptvVoYEL"


@pytest.mark.asyncio
Expand Down Expand Up @@ -658,6 +660,7 @@ async def test_stream_message_async(

assert span["op"] == OP.GEN_AI_CHAT
assert span["description"] == "chat model"
assert span["data"][SPANDATA.GEN_AI_SYSTEM] == "anthropic"
assert span["data"][SPANDATA.GEN_AI_OPERATION_NAME] == "chat"
assert span["data"][SPANDATA.GEN_AI_REQUEST_MODEL] == "model"

Expand All @@ -676,6 +679,7 @@ async def test_stream_message_async(
assert span["data"][SPANDATA.GEN_AI_USAGE_OUTPUT_TOKENS] == 10
assert span["data"][SPANDATA.GEN_AI_USAGE_TOTAL_TOKENS] == 20
assert span["data"][SPANDATA.GEN_AI_RESPONSE_STREAMING] is True
assert span["data"][SPANDATA.GEN_AI_RESPONSE_ID] == "msg_01XFDUDYJgAACzvnptvVoYEL"


@pytest.mark.skipif(
Expand Down Expand Up @@ -958,6 +962,7 @@ def test_stream_messages_with_input_json_delta(

assert span["op"] == OP.GEN_AI_CHAT
assert span["description"] == "chat model"
assert span["data"][SPANDATA.GEN_AI_SYSTEM] == "anthropic"
assert span["data"][SPANDATA.GEN_AI_OPERATION_NAME] == "chat"
assert span["data"][SPANDATA.GEN_AI_REQUEST_MODEL] == "model"

Expand Down Expand Up @@ -1275,6 +1280,7 @@ async def test_stream_message_with_input_json_delta_async(

assert span["op"] == OP.GEN_AI_CHAT
assert span["description"] == "chat model"
assert span["data"][SPANDATA.GEN_AI_SYSTEM] == "anthropic"
assert span["data"][SPANDATA.GEN_AI_OPERATION_NAME] == "chat"
assert span["data"][SPANDATA.GEN_AI_REQUEST_MODEL] == "model"

Expand Down Expand Up @@ -2074,6 +2080,7 @@ def test_stream_messages_with_system_prompt(

assert span["op"] == OP.GEN_AI_CHAT
assert span["description"] == "chat model"
assert span["data"][SPANDATA.GEN_AI_SYSTEM] == "anthropic"
assert span["data"][SPANDATA.GEN_AI_OPERATION_NAME] == "chat"
assert span["data"][SPANDATA.GEN_AI_REQUEST_MODEL] == "model"

Expand Down Expand Up @@ -2205,6 +2212,7 @@ async def test_stream_message_with_system_prompt_async(

assert span["op"] == OP.GEN_AI_CHAT
assert span["description"] == "chat model"
assert span["data"][SPANDATA.GEN_AI_SYSTEM] == "anthropic"
assert span["data"][SPANDATA.GEN_AI_OPERATION_NAME] == "chat"
assert span["data"][SPANDATA.GEN_AI_REQUEST_MODEL] == "model"

Expand Down
Loading