Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix: anthropic claude-3-opus-20240229 EOL

Yuta Saito23713d1811e3
diff --git a/tests/local_testing/test_completion.py b/tests/local_testing/test_completion.py
index 2b01b4c2a12..5e92c10fbdc 100644
--- a/tests/local_testing/test_completion.py
+++ b/tests/local_testing/test_completion.py
@@ -286,7 +286,7 @@ def test_completion_claude_3_empty_response():
},
]
try:
- response = litellm.completion(model="claude-3-opus-20240229", messages=messages)
+ response = litellm.completion(model="claude-3-7-sonnet-20250219", messages=messages)
print(response)
except litellm.InternalServerError as e:
pytest.skip(f"InternalServerError - {str(e)}")
@@ -313,7 +313,7 @@ def test_completion_claude_3():
try:
# test without max tokens
response = completion(
- model="anthropic/claude-3-opus-20240229",
+ model="anthropic/claude-3-7-sonnet-20250219",
messages=messages,
)
# Add any assertions, here to check response args
@@ -326,7 +326,7 @@ def test_completion_claude_3():
@pytest.mark.parametrize(
"model",
- ["anthropic/claude-3-opus-20240229", "anthropic.claude-3-sonnet-20240229-v1:0"],
+ ["anthropic/claude-3-7-sonnet-20250219", "anthropic.claude-3-sonnet-20240229-v1:0"],
)
def test_completion_claude_3_function_call(model):
litellm.set_verbose = True
@@ -411,7 +411,7 @@ def test_completion_claude_3_function_call(model):
"model, api_key, api_base",
[
("gpt-3.5-turbo", None, None),
- ("claude-3-opus-20240229", None, None),
+ ("claude-3-7-sonnet-20250219", None, None),
("anthropic.claude-3-sonnet-20240229-v1:0", None, None),
# (
# "azure_ai/command-r-plus",
@@ -512,7 +512,7 @@ async def test_anthropic_no_content_error():
try:
litellm.drop_params = True
response = await litellm.acompletion(
- model="anthropic/claude-3-opus-20240229",
+ model="anthropic/claude-3-7-sonnet-20250219",
api_key=os.getenv("ANTHROPIC_API_KEY"),
messages=[
{
@@ -630,7 +630,7 @@ def test_completion_claude_3_multi_turn_conversations():
]
try:
response = completion(
- model="anthropic/claude-3-opus-20240229",
+ model="anthropic/claude-3-7-sonnet-20250219",
messages=messages,
)
print(response)
@@ -644,7 +644,7 @@ def test_completion_claude_3_stream():
try:
# test without max tokens
response = completion(
- model="anthropic/claude-3-opus-20240229",
+ model="anthropic/claude-3-7-sonnet-20250219",
messages=messages,
max_tokens=10,
stream=True,
@@ -669,7 +669,7 @@ def encode_image(image_path):
[
"gpt-4o",
"azure/gpt-4.1-mini",
- "anthropic/claude-3-opus-20240229",
+ "anthropic/claude-3-7-sonnet-20250219",
],
) #
def test_completion_base64(model):
diff --git a/tests/local_testing/test_streaming.py b/tests/local_testing/test_streaming.py
index f63ec3859f2..29e017318ac 100644
--- a/tests/local_testing/test_streaming.py
+++ b/tests/local_testing/test_streaming.py
@@ -1418,7 +1418,7 @@ def test_bedrock_claude_3_streaming():
@pytest.mark.parametrize(
"model",
[
- "claude-3-opus-20240229",
+ "claude-3-7-sonnet-20250219",
"cohere.command-r-plus-v1:0", # bedrock
"gpt-3.5-turbo",
],
@@ -2914,7 +2914,7 @@ def test_completion_claude_3_function_call_with_streaming():
try:
# test without max tokens
response = completion(
- model="claude-3-opus-20240229",
+ model="claude-3-7-sonnet-20250219",
messages=messages,
tools=tools,
tool_choice="required",
@@ -2946,7 +2946,7 @@ def test_completion_claude_3_function_call_with_streaming():
"model",
[
"gemini/gemini-2.5-flash-lite",
- ], # "claude-3-opus-20240229"
+ ],
) #
@pytest.mark.asyncio
async def test_acompletion_function_call_with_streaming(model):