Skip to content

Commit aee9c2c

Browse files
committed
Workaround for change in Claude's ability to request multiple tools at once
1 parent 6031044 commit aee9c2c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_provider_anthropic.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ def run_simpleassert():
5757
retryassert(run_simpleassert, retries=5)
5858

5959
def run_parallelassert():
60-
assert_tools_parallel(chat_fun)
60+
# For some reason, at the time of writing, Claude 3.7 doesn't
61+
# respond with multiple tools at once for this test (but it does)
62+
# answer the question correctly with sequential tools.
63+
def chat_fun2(**kwargs):
64+
return ChatAnthropic(model="claude-3-5-sonnet-latest", **kwargs)
65+
66+
assert_tools_parallel(chat_fun2)
6167

6268
retryassert(run_parallelassert, retries=5)
6369

@@ -87,5 +93,4 @@ def run_inlineassert():
8793
assert_images_inline(chat_fun)
8894

8995
retryassert(run_inlineassert, retries=3)
90-
9196
assert_images_remote_error(chat_fun)

0 commit comments

Comments
 (0)