File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 57
57
- name : Run tests
58
58
run : hatch run cov-retry
59
59
60
+ - name : Run unit tests with lowest direct dependencies
61
+ run : |
62
+ hatch run uv pip compile pyproject.toml --resolution lowest-direct --output-file requirements_lowest_direct.txt
63
+ hatch run uv pip install -r requirements_lowest_direct.txt
64
+ hatch run test -m "not integration"
65
+
60
66
- name : Nightly - run unit tests with Haystack main branch
61
67
if : github.event_name == 'schedule'
62
68
run : |
69
+ hatch env prune
63
70
hatch run uv pip install git+https://github.com/deepset-ai/haystack.git@main
64
71
hatch run cov-retry -m "not integration"
65
72
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ classifiers = [
23
23
" Programming Language :: Python :: Implementation :: CPython" ,
24
24
" Programming Language :: Python :: Implementation :: PyPy" ,
25
25
]
26
- dependencies = [" haystack-ai>=2.9 .0" , " anthropic" ]
26
+ dependencies = [" haystack-ai>=2.11 .0" , " anthropic>=0.47.0 " ]
27
27
28
28
[project .urls ]
29
29
Documentation = " https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/anthropic#readme"
Original file line number Diff line number Diff line change @@ -339,6 +339,12 @@ def test_convert_anthropic_chunk_to_streaming_chunk(self):
339
339
)
340
340
streaming_chunk = component ._convert_anthropic_chunk_to_streaming_chunk (message_start_chunk )
341
341
assert streaming_chunk .content == ""
342
+
343
+ # remove fields not present in the pinned version of the Anthropic SDK.
344
+ # This ensures the test passes with both the pinned and the latest version of the Anthropic SDK.
345
+ streaming_chunk .meta ["message" ]["usage" ].pop ("server_tool_use" , None )
346
+ streaming_chunk .meta ["message" ]["usage" ].pop ("service_tier" , None )
347
+
342
348
assert streaming_chunk .meta == {
343
349
"type" : "message_start" ,
344
350
"message" : {
@@ -354,8 +360,6 @@ def test_convert_anthropic_chunk_to_streaming_chunk(self):
354
360
"output_tokens" : 1 ,
355
361
"cache_creation_input_tokens" : None ,
356
362
"cache_read_input_tokens" : None ,
357
- "server_tool_use" : None ,
358
- "service_tier" : None ,
359
363
},
360
364
},
361
365
}
You can’t perform that action at this time.
0 commit comments