mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Merge pull request #18693 from BerriAI/litellm_fix_main_test
fix main test
This commit is contained in:
commit
facc4b0b79
2 changed files with 11 additions and 11 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue