[Test] Anthropic: Replace Legacy Claude-4-Sonnet Alias With Haiku 4.5

Three live-API tests pinned to claude-4-sonnet-20250514, which is a
non-canonical alias of claude-sonnet-4-20250514. Anthropic's main API
no longer resolves the legacy form under freshly issued keys, so the
tests fail with not_found_error. The token counter test pinned to
claude-sonnet-4-20250514 itself (deprecation_date 2026-05-14, two weeks
out) was on borrowed time too.

Bump all four to claude-haiku-4-5-20251001 — capability superset for what
these tests exercise (streaming, parallel tool calling, extended thinking,
token counting), no upcoming deprecation, cheaper per-token.
This commit is contained in:
Yuneng Jiang 2026-05-01 19:10:27 -07:00
parent 0ff9d65f8d
commit e3917c9d08
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ class TestAnthropicTokenCounter(BaseTokenCounterTest):
return AnthropicTokenCounter()
def get_test_model(self) -> str:
return "claude-sonnet-4-20250514"
return "claude-haiku-4-5-20251001"
def get_test_messages(self) -> List[Dict[str, Any]]:
return [{"role": "user", "content": "Hello, how are you today?"}]

View file

@ -158,7 +158,7 @@ def test_aaparallel_function_call(model):
@pytest.mark.parametrize(
"model",
[
"anthropic/claude-4-sonnet-20250514",
"anthropic/claude-haiku-4-5-20251001",
"bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0",
],
)

View file

@ -1270,7 +1270,7 @@ def test_bedrock_claude_3_streaming():
@pytest.mark.parametrize(
"model",
[
"claude-4-sonnet-20250514",
"claude-haiku-4-5-20251001",
"cohere.command-r-plus-v1:0", # bedrock
"gpt-3.5-turbo",
],
@ -2696,7 +2696,7 @@ def test_completion_claude_3_function_call_with_streaming():
try:
# test without max tokens
response = completion(
model="claude-4-sonnet-20250514",
model="claude-haiku-4-5-20251001",
messages=messages,
tools=tools,
tool_choice="required",