From e02f10285a7e49f7297f48bbd4b0b3ebd5446f44 Mon Sep 17 00:00:00 2001 From: Denis Shulyaka Date: Wed, 23 Sep 2026 14:05:39 +0300 Subject: [PATCH] Bump Anthropic to 0.125.0 (#182976) --- homeassistant/components/anthropic/entity.py | 11 +++++++++-- homeassistant/components/anthropic/manifest.json | 2 +- requirements_all.txt | 2 +- .../anthropic/snapshots/test_conversation.ambr | 14 +++++++------- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/homeassistant/components/anthropic/entity.py b/homeassistant/components/anthropic/entity.py index 89c9aa3d5a5e..3039cdf222d4 100644 --- a/homeassistant/components/anthropic/entity.py +++ b/homeassistant/components/anthropic/entity.py @@ -63,7 +63,6 @@ from anthropic.types import ( ToolParam, ToolSearchToolBm25_20251119Param, ToolSearchToolResultBlock, - ToolUnionParam, ToolUseBlock, ToolUseBlockParam, Usage, @@ -1010,7 +1009,15 @@ class AnthropicBaseLLMEntity(CoordinatorEntity[AnthropicCoordinator]): effort=options[CONF_THINKING_EFFORT] ) - tools: list[ToolUnionParam] = [] + tools: list[ + ToolParam + | CodeExecutionTool20250825Param + | WebSearchTool20250305Param + | WebSearchTool20260209Param + | WebFetchTool20250910Param + | WebFetchTool20260209Param + | ToolSearchToolBm25_20251119Param + ] = [] if chat_log.llm_api: tools = [ _format_tool(tool, chat_log.llm_api.custom_serializer) diff --git a/homeassistant/components/anthropic/manifest.json b/homeassistant/components/anthropic/manifest.json index 398f3ccef507..462df1e3702a 100644 --- a/homeassistant/components/anthropic/manifest.json +++ b/homeassistant/components/anthropic/manifest.json @@ -9,5 +9,5 @@ "integration_type": "service", "iot_class": "cloud_polling", "quality_scale": "platinum", - "requirements": ["anthropic==0.108.0"] + "requirements": ["anthropic==0.125.0"] } diff --git a/requirements_all.txt b/requirements_all.txt index a784e85d8012..d617a8bd0d26 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -549,7 +549,7 @@ anova-wifi==1.0.1 anthemav==1.4.2 # homeassistant.components.anthropic -anthropic==0.108.0 +anthropic==0.125.0 # homeassistant.components.mcp_server anyio==4.14.2 diff --git a/tests/components/anthropic/snapshots/test_conversation.ambr b/tests/components/anthropic/snapshots/test_conversation.ambr index 3d168e1e345f..3e6a90c37c3b 100644 --- a/tests/components/anthropic/snapshots/test_conversation.ambr +++ b/tests/components/anthropic/snapshots/test_conversation.ambr @@ -53,7 +53,7 @@ 'native': dict({ 'citation_details': list([ ]), - 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc)), + 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc), skills=None), 'redacted_thinking': None, 'thinking_signature': None, }), @@ -154,7 +154,7 @@ 'native': dict({ 'citation_details': list([ ]), - 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc)), + 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc), skills=None), 'redacted_thinking': None, 'thinking_signature': None, }), @@ -1137,7 +1137,7 @@ 'native': dict({ 'citation_details': list([ ]), - 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc)), + 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc), skills=None), 'redacted_thinking': None, 'thinking_signature': None, }), @@ -1245,7 +1245,7 @@ 'native': dict({ 'citation_details': list([ ]), - 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc)), + 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc), skills=None), 'redacted_thinking': None, 'thinking_signature': None, }), @@ -1356,7 +1356,7 @@ 'native': dict({ 'citation_details': list([ ]), - 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc)), + 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc), skills=None), 'redacted_thinking': None, 'thinking_signature': None, }), @@ -1457,7 +1457,7 @@ 'native': dict({ 'citation_details': list([ ]), - 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc)), + 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc), skills=None), 'redacted_thinking': None, 'thinking_signature': None, }), @@ -2449,7 +2449,7 @@ 'native': dict({ 'citation_details': list([ ]), - 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc)), + 'container': Container(id='container_1234567890ABCDEFGHIJKLMN', expires_at=HAFakeDatetime(2025, 10, 31, 12, 5, tzinfo=datetime.timezone.utc), skills=None), 'redacted_thinking': None, 'thinking_signature': None, }),