fix(anthropic): replace retired model IDs in tests and docstrings (#35365)

## Summary

- Replace `claude-3-5-haiku-20241022` and `claude-3-7-sonnet-20250219`
with `claude-haiku-4-5-20251001` and `claude-sonnet-4-5-20250929`
respectively
- Both models were retired by Anthropic on February 19, 2026, causing
all anthropic integration tests to fail
- Updates integration tests, a unit test, and docstring examples in
`langchain-core`

See:
https://platform.claude.com/docs/en/docs/resources/model-deprecations
This commit is contained in:
Mason Daugherty
2026-02-20 13:44:15 -05:00
committed by GitHub
parent 070c234104
commit ca246ddef2
4 changed files with 9 additions and 9 deletions

View File

@@ -48,7 +48,7 @@ def test_init_time_with_client(benchmark: BenchmarkFixture) -> None:
def _init_in_loop_with_clients() -> None:
for _ in range(10):
llm = ChatAnthropic(model="claude-3-5-haiku-20241022")
llm = ChatAnthropic(model="claude-haiku-4-5-20251001")
_ = llm._client
_ = llm._async_client