Skip to content

Remove retired Claude Haiku 3 model#168657

Open
Shulyaka wants to merge 1 commit intohome-assistant:devfrom
Shulyaka:anthropic_deprecate_claude_3
Open

Remove retired Claude Haiku 3 model#168657
Shulyaka wants to merge 1 commit intohome-assistant:devfrom
Shulyaka:anthropic_deprecate_claude_3

Conversation

@Shulyaka
Copy link
Copy Markdown
Contributor

Proposed change

Remove support for Claude Haiku 3 which has been retired today.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue:
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes references to the retired Claude Haiku 3 model from the Anthropic integration test fixtures/snapshots and adjusts model aliasing/config-flow behavior accordingly.

Changes:

  • Remove “Claude Haiku 3” from the mocked model list and the config-flow model-list snapshot.
  • Update Anthropic tests to use current model IDs/defaults (e.g., Haiku 4.5 / Opus 4).
  • Simplify model_alias() handling and remove per-model web/code-execution “unsupported” lists.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/components/anthropic/test_init.py Updates deprecated-model repair test to use a newer model ID.
tests/components/anthropic/test_config_flow.py Updates expected options/model IDs for current defaults.
tests/components/anthropic/snapshots/test_config_flow.ambr Removes “Claude Haiku 3” from the model picker snapshot.
tests/components/anthropic/init.py Removes Haiku 3 from the mocked Anthropic model_list.
homeassistant/components/anthropic/coordinator.py Adjusts model alias resolution logic.
homeassistant/components/anthropic/const.py Removes model-specific unsupported lists; narrows tool-search unsupported prefixes.
homeassistant/components/anthropic/config_flow.py Removes gating based on unsupported model lists; always exposes web/code execution toggles.

Comment on lines +31 to 33
if model_id[-2:-1] != "-" and not model_id.endswith("-preview"):
model_id = model_id[:-9]
if _model_short_form.search(model_id):
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make model_alias only strip a trailing date suffix (e.g., -YYYYMMDD) so it stays idempotent for already-short model IDs. With the current model_id[-2:-1] != "-" check, a short ID like claude-3-7-sonnet (which can result from stripping claude-3-7-sonnet-20250219) gets truncated to claude, breaking alias matching in get_model_info and any UI that round-trips these values.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants