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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
[Fix] Replace deprecated claude-3-7-sonnet-20250219 with claude-sonnet-4-5-20250929 in test_completion
yuneng-jiangc27b65d09e15
diff --git a/tests/local_testing/test_completion.py b/tests/local_testing/test_completion.pyindex b9a366d9f37..51ed6a53bbb 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-7-sonnet-20250219", messages=messages)+ response = litellm.completion(model="claude-sonnet-4-5-20250929", 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 tokensresponse = completion(- model="anthropic/claude-3-7-sonnet-20250219",+ model="anthropic/claude-sonnet-4-5-20250929",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-7-sonnet-20250219", "anthropic.claude-3-sonnet-20240229-v1:0"],+ ["anthropic/claude-sonnet-4-5-20250929", "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-7-sonnet-20250219", None, None),+ ("claude-sonnet-4-5-20250929", 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 = Trueresponse = await litellm.acompletion(- model="anthropic/claude-3-7-sonnet-20250219",+ model="anthropic/claude-sonnet-4-5-20250929",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-7-sonnet-20250219",+ model="anthropic/claude-sonnet-4-5-20250929",messages=messages,)print(response)@@ -644,7 +644,7 @@ def test_completion_claude_3_stream():try:# test without max tokensresponse = completion(- model="anthropic/claude-3-7-sonnet-20250219",+ model="anthropic/claude-sonnet-4-5-20250929",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-7-sonnet-20250219",+ "anthropic/claude-sonnet-4-5-20250929",],) #def test_completion_base64(model):