mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
[Fix] Replace deprecated claude-3-7-sonnet-20250219 with claude-sonnet-4-5-20250929 in test_completion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3b0a64ce9d
commit
39b097d916
1 changed files with 8 additions and 8 deletions
|
|
@ -286,7 +286,7 @@ def test_completion_claude_3_empty_response():
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
try:
|
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)
|
print(response)
|
||||||
except litellm.InternalServerError as e:
|
except litellm.InternalServerError as e:
|
||||||
pytest.skip(f"InternalServerError - {str(e)}")
|
pytest.skip(f"InternalServerError - {str(e)}")
|
||||||
|
|
@ -313,7 +313,7 @@ def test_completion_claude_3():
|
||||||
try:
|
try:
|
||||||
# test without max tokens
|
# test without max tokens
|
||||||
response = completion(
|
response = completion(
|
||||||
model="anthropic/claude-3-7-sonnet-20250219",
|
model="anthropic/claude-sonnet-4-5-20250929",
|
||||||
messages=messages,
|
messages=messages,
|
||||||
)
|
)
|
||||||
# Add any assertions, here to check response args
|
# Add any assertions, here to check response args
|
||||||
|
|
@ -326,7 +326,7 @@ def test_completion_claude_3():
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"model",
|
"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):
|
def test_completion_claude_3_function_call(model):
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
|
|
@ -411,7 +411,7 @@ def test_completion_claude_3_function_call(model):
|
||||||
"model, api_key, api_base",
|
"model, api_key, api_base",
|
||||||
[
|
[
|
||||||
("gpt-3.5-turbo", None, None),
|
("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),
|
("anthropic.claude-3-sonnet-20240229-v1:0", None, None),
|
||||||
# (
|
# (
|
||||||
# "azure_ai/command-r-plus",
|
# "azure_ai/command-r-plus",
|
||||||
|
|
@ -512,7 +512,7 @@ async def test_anthropic_no_content_error():
|
||||||
try:
|
try:
|
||||||
litellm.drop_params = True
|
litellm.drop_params = True
|
||||||
response = await litellm.acompletion(
|
response = await litellm.acompletion(
|
||||||
model="anthropic/claude-3-7-sonnet-20250219",
|
model="anthropic/claude-sonnet-4-5-20250929",
|
||||||
api_key=os.getenv("ANTHROPIC_API_KEY"),
|
api_key=os.getenv("ANTHROPIC_API_KEY"),
|
||||||
messages=[
|
messages=[
|
||||||
{
|
{
|
||||||
|
|
@ -630,7 +630,7 @@ def test_completion_claude_3_multi_turn_conversations():
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
response = completion(
|
response = completion(
|
||||||
model="anthropic/claude-3-7-sonnet-20250219",
|
model="anthropic/claude-sonnet-4-5-20250929",
|
||||||
messages=messages,
|
messages=messages,
|
||||||
)
|
)
|
||||||
print(response)
|
print(response)
|
||||||
|
|
@ -644,7 +644,7 @@ def test_completion_claude_3_stream():
|
||||||
try:
|
try:
|
||||||
# test without max tokens
|
# test without max tokens
|
||||||
response = completion(
|
response = completion(
|
||||||
model="anthropic/claude-3-7-sonnet-20250219",
|
model="anthropic/claude-sonnet-4-5-20250929",
|
||||||
messages=messages,
|
messages=messages,
|
||||||
max_tokens=10,
|
max_tokens=10,
|
||||||
stream=True,
|
stream=True,
|
||||||
|
|
@ -669,7 +669,7 @@ def encode_image(image_path):
|
||||||
[
|
[
|
||||||
"gpt-4o",
|
"gpt-4o",
|
||||||
"azure/gpt-4.1-mini",
|
"azure/gpt-4.1-mini",
|
||||||
"anthropic/claude-3-7-sonnet-20250219",
|
"anthropic/claude-sonnet-4-5-20250929",
|
||||||
],
|
],
|
||||||
) #
|
) #
|
||||||
def test_completion_base64(model):
|
def test_completion_base64(model):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue