diff --git a/libs/partners/anthropic/langchain_anthropic/chat_models.py b/libs/partners/anthropic/langchain_anthropic/chat_models.py index b1052a1f100..11b3bc9f631 100644 --- a/libs/partners/anthropic/langchain_anthropic/chat_models.py +++ b/libs/partners/anthropic/langchain_anthropic/chat_models.py @@ -1128,7 +1128,7 @@ class ChatAnthropic(BaseChatModel): from langchain_anthropic import ChatAnthropic - llm = ChatAnthropic(model="claude-3-5-sonnet-latest") + llm = ChatAnthropic(model="claude-3-5-haiku-latest") tool = {"type": "web_search_20250305", "name": "web_search", "max_uses": 3} llm_with_tools = llm.bind_tools([tool]) diff --git a/libs/partners/anthropic/tests/cassettes/test_web_search.yaml.gz b/libs/partners/anthropic/tests/cassettes/test_web_search.yaml.gz index 546cdf8c505..6802f280403 100644 Binary files a/libs/partners/anthropic/tests/cassettes/test_web_search.yaml.gz and b/libs/partners/anthropic/tests/cassettes/test_web_search.yaml.gz differ diff --git a/libs/partners/anthropic/tests/integration_tests/test_chat_models.py b/libs/partners/anthropic/tests/integration_tests/test_chat_models.py index 73e4be5b40f..cb937155bf4 100644 --- a/libs/partners/anthropic/tests/integration_tests/test_chat_models.py +++ b/libs/partners/anthropic/tests/integration_tests/test_chat_models.py @@ -895,13 +895,13 @@ def test_image_tool_calling() -> None: ], ), ] - llm = ChatAnthropic(model="claude-3-5-sonnet-latest") # type: ignore[call-arg] + llm = ChatAnthropic(model="claude-3-5-haiku-latest") # type: ignore[call-arg] llm.bind_tools([color_picker]).invoke(messages) @pytest.mark.vcr def test_web_search() -> None: - llm = ChatAnthropic(model="claude-3-5-sonnet-latest") # type: ignore[call-arg] + llm = ChatAnthropic(model="claude-3-5-haiku-latest") # type: ignore[call-arg] tool = {"type": "web_search_20250305", "name": "web_search", "max_uses": 1} llm_with_tools = llm.bind_tools([tool])