From b031a082cd41aee99551cb5310abcb395ee371ee Mon Sep 17 00:00:00 2001 From: Denis Shulyaka Date: Sat, 29 Nov 2025 16:35:30 +0300 Subject: [PATCH] Bump anthropic to 0.75.0 (#157491) --- homeassistant/components/anthropic/config_flow.py | 2 ++ homeassistant/components/anthropic/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/anthropic/conftest.py | 6 ++++++ tests/components/anthropic/test_config_flow.py | 8 ++++++-- 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/anthropic/config_flow.py b/homeassistant/components/anthropic/config_flow.py index 65d912fa00d..84f2e3155c0 100644 --- a/homeassistant/components/anthropic/config_flow.py +++ b/homeassistant/components/anthropic/config_flow.py @@ -421,6 +421,8 @@ class ConversationSubentryFlowHandler(ConfigSubentryFlow): ) if short_form.search(model_alias): model_alias += "-0" + if model_alias.endswith(("haiku", "opus", "sonnet")): + model_alias += "-latest" model_options.append( SelectOptionDict( label=model_info.display_name, diff --git a/homeassistant/components/anthropic/manifest.json b/homeassistant/components/anthropic/manifest.json index bb24dfbd397..e32e98c553b 100644 --- a/homeassistant/components/anthropic/manifest.json +++ b/homeassistant/components/anthropic/manifest.json @@ -8,5 +8,5 @@ "documentation": "https://www.home-assistant.io/integrations/anthropic", "integration_type": "service", "iot_class": "cloud_polling", - "requirements": ["anthropic==0.73.0"] + "requirements": ["anthropic==0.75.0"] } diff --git a/requirements_all.txt b/requirements_all.txt index 22fdc3b5fff..45ffd09c7e6 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -504,7 +504,7 @@ anova-wifi==0.17.0 anthemav==1.4.1 # homeassistant.components.anthropic -anthropic==0.73.0 +anthropic==0.75.0 # homeassistant.components.mcp_server anyio==4.10.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 00dd57143b3..797a7c48758 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -480,7 +480,7 @@ anova-wifi==0.17.0 anthemav==1.4.1 # homeassistant.components.anthropic -anthropic==0.73.0 +anthropic==0.75.0 # homeassistant.components.mcp_server anyio==4.10.0 diff --git a/tests/components/anthropic/conftest.py b/tests/components/anthropic/conftest.py index 5b40b1d0c38..b02151381ac 100644 --- a/tests/components/anthropic/conftest.py +++ b/tests/components/anthropic/conftest.py @@ -128,6 +128,12 @@ async def mock_init_component( """Initialize integration.""" model_list = AsyncPage( data=[ + ModelInfo( + id="claude-opus-4-5-20251101", + created_at=datetime.datetime(2025, 11, 1, 0, 0, tzinfo=datetime.UTC), + display_name="Claude Opus 4.5", + type="model", + ), ModelInfo( id="claude-haiku-4-5-20251001", created_at=datetime.datetime(2025, 10, 15, 0, 0, tzinfo=datetime.UTC), diff --git a/tests/components/anthropic/test_config_flow.py b/tests/components/anthropic/test_config_flow.py index 46635e14c4f..80a9aa7105f 100644 --- a/tests/components/anthropic/test_config_flow.py +++ b/tests/components/anthropic/test_config_flow.py @@ -357,6 +357,10 @@ async def test_model_list( assert options["type"] == FlowResultType.FORM assert options["step_id"] == "advanced" assert options["data_schema"].schema["chat_model"].config["options"] == [ + { + "label": "Claude Opus 4.5", + "value": "claude-opus-4-5", + }, { "label": "Claude Haiku 4.5", "value": "claude-haiku-4-5", @@ -379,11 +383,11 @@ async def test_model_list( }, { "label": "Claude Sonnet 3.7", - "value": "claude-3-7-sonnet", + "value": "claude-3-7-sonnet-latest", }, { "label": "Claude Haiku 3.5", - "value": "claude-3-5-haiku", + "value": "claude-3-5-haiku-latest", }, { "label": "Claude Haiku 3",