test(bedrock): swap legacy claude-3/3.5 model strings for 4.5 inference profiles

The pinned model IDs anthropic.claude-3-sonnet-20240229-v1:0 and
anthropic.claude-3-5-haiku-20241022-v1:0 are in the Bedrock 'public
extended access' phase of Legacy (EOL 2026-07-30 and 2026-06-19
respectively). Bedrock now returns ValidationException 'Operation not
allowed' for accounts that aren't grandfathered/active on these models,
which is what the CCI Bedrock-using account hits.

Swap to the current-generation inference profiles already used elsewhere
in the suite:

  - claude-3-5-haiku-20241022-v1:0       -> us.claude-haiku-4-5-20251001-v1:0
  - claude-3-sonnet-20240229-v1:0        -> us.claude-sonnet-4-5-20250929-v1:0
  - us.claude-3-sonnet-20240229-v1:0     -> us.claude-sonnet-4-5-20250929-v1:0
  - bedrock/claude-3-sonnet-20240229-v1:0 -> bedrock/us.claude-sonnet-4-5-20250929-v1:0

Affected tests:
  - tests/litellm_utils_tests/test_litellm_overhead.py
      test_litellm_overhead_non_streaming, test_litellm_overhead_stream
  - tests/local_testing/test_function_calling.py
      test_aaparallel_function_call, test_parallel_function_call_anthropic_error_msg,
      test_passing_tool_result_as_list
  - tests/test_openai_endpoints.py
      test_chat_completion_anthropic_structured_output
This commit is contained in:
Yuneng Jiang 2026-05-23 10:48:56 -07:00
parent 7270f723de
commit e689917435
No known key found for this signature in database
3 changed files with 7 additions and 9 deletions

View file

@ -14,7 +14,6 @@ sys.path.insert(
) # Adds the parent directory to the system path
import litellm
# Fake Vertex AI Gemini response for mocking
FAKE_VERTEX_GEMINI_RESPONSE = {
"candidates": [
@ -82,7 +81,7 @@ async def _vertex_ai_mocks():
"bedrock/mistral.mistral-7b-instruct-v0:2",
"openai/gpt-4o",
"openai/self_hosted",
"bedrock/anthropic.claude-3-5-haiku-20241022-v1:0",
"bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0",
"vertex_ai/gemini-1.5-flash",
],
)
@ -147,7 +146,7 @@ async def test_litellm_overhead_non_streaming(model):
[
"bedrock/mistral.mistral-7b-instruct-v0:2",
"openai/gpt-4o",
"bedrock/anthropic.claude-3-5-haiku-20241022-v1:0",
"bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0",
"openai/self_hosted",
],
)

View file

@ -49,7 +49,7 @@ def get_current_weather(location, unit="fahrenheit"):
"mistral/mistral-large-latest",
"claude-haiku-4-5-20251001",
"gemini/gemini-2.5-flash-lite",
"anthropic.claude-3-sonnet-20240229-v1:0",
"us.anthropic.claude-sonnet-4-5-20250929-v1:0",
],
)
@pytest.mark.flaky(retries=3, delay=1)
@ -267,7 +267,6 @@ def test_aaparallel_function_call_with_anthropic_thinking(model):
from litellm.types.utils import ChatCompletionMessageToolCall, Function, Message
_PARALLEL_TOOL_HISTORY_MESSAGES = [
{
"role": "user",
@ -303,7 +302,7 @@ _PARALLEL_TOOL_HISTORY_MESSAGES = [
[
# Bedrock Converse still requires modify_params to inject the dummy tool.
(
"anthropic.claude-3-sonnet-20240229-v1:0",
"us.anthropic.claude-sonnet-4-5-20250929-v1:0",
_PARALLEL_TOOL_HISTORY_MESSAGES,
True,
),
@ -314,7 +313,7 @@ _PARALLEL_TOOL_HISTORY_MESSAGES = [
False,
),
(
"anthropic.claude-3-sonnet-20240229-v1:0",
"us.anthropic.claude-sonnet-4-5-20250929-v1:0",
[
{
"role": "user",
@ -579,7 +578,7 @@ def test_groq_parallel_function_call():
@pytest.mark.parametrize(
"model",
[
"bedrock/anthropic.claude-3-sonnet-20240229-v1:0",
"bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0",
],
)
def test_passing_tool_result_as_list(model):

View file

@ -446,7 +446,7 @@ async def test_chat_completion_anthropic_structured_output():
client = AsyncOpenAI(api_key="sk-1234", base_url="http://0.0.0.0:4000")
res = await client.beta.chat.completions.parse(
model="bedrock/us.anthropic.claude-3-sonnet-20240229-v1:0",
model="bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0",
messages=messages,
response_format=EventsList,
timeout=60,