diff --git a/tests/logging_callback_tests/test_bedrock_knowledgebase_hook.py b/tests/logging_callback_tests/test_bedrock_knowledgebase_hook.py index f87351edb01..8ce283ed4c9 100644 --- a/tests/logging_callback_tests/test_bedrock_knowledgebase_hook.py +++ b/tests/logging_callback_tests/test_bedrock_knowledgebase_hook.py @@ -181,7 +181,7 @@ async def test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call_streaming(s # litellm._turn_on_debug() async_client = AsyncHTTPHandler() response = await litellm.acompletion( - model="anthropic/claude-3-5-haiku-latest", + model="anthropic/claude-haiku-4-5-20251001", messages=[{"role": "user", "content": "what is litellm?"}], vector_store_ids = [ "T37J8R4WTM" @@ -232,7 +232,7 @@ async def test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call_with_tools( # Init client litellm._turn_on_debug() response = await litellm.acompletion( - model="anthropic/claude-3-5-haiku-latest", + model="anthropic/claude-haiku-4-5-20251001", messages=[{"role": "user", "content": "what is litellm?"}], max_tokens=10, tools=[ @@ -255,7 +255,7 @@ async def test_e2e_bedrock_knowledgebase_retrieval_with_llm_api_call_with_tools_ litellm._turn_on_debug() response = await litellm.acompletion( - model="anthropic/claude-3-5-haiku-latest", + model="anthropic/claude-haiku-4-5-20251001", messages=[{"role": "user", "content": "what is litellm?"}], max_tokens=10, tools=[ @@ -350,7 +350,7 @@ async def test_bedrock_kb_request_body_has_transformed_filters(setup_vector_stor new=AsyncMock(side_effect=fake_async_vector_store_search_handler), ): response = await litellm.acompletion( - model="anthropic/claude-3-5-haiku-latest", + model="anthropic/claude-haiku-4-5-20251001", messages=[{"role": "user", "content": "what is litellm?"}], max_tokens=10, tools=[ diff --git a/tests/logging_callback_tests/test_langfuse_e2e_test.py b/tests/logging_callback_tests/test_langfuse_e2e_test.py index 866e95a702c..8314abb9055 100644 --- a/tests/logging_callback_tests/test_langfuse_e2e_test.py +++ b/tests/logging_callback_tests/test_langfuse_e2e_test.py @@ -149,17 +149,26 @@ class TestLangfuseLogging: # Verify the call assert mock_post.call_count >= 1 - url = mock_post.call_args[0][0] - request_body = mock_post.call_args[1].get("content") - # Parse the JSON string into a dict for assertions - actual_request_body = json.loads(request_body) + # Aggregate batch items from ALL calls (langfuse may split trace-create + # and generation-create across separate HTTP requests) + all_batch_items = [] + last_metadata = None + for call in mock_post.call_args_list: + url = call[0][0] + assert url == "https://us.cloud.langfuse.com/api/public/ingestion" + body = json.loads(call[1].get("content")) + all_batch_items.extend(body.get("batch", [])) + last_metadata = body.get("metadata", last_metadata) + + actual_request_body = { + "batch": all_batch_items, + "metadata": last_metadata, + } print("\nMocked Request Details:") - print(f"URL: {url}") print(f"Request Body: {json.dumps(actual_request_body, indent=4)}") - assert url == "https://us.cloud.langfuse.com/api/public/ingestion" assert_langfuse_request_matches_expected( actual_request_body, expected_file_name, diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py index 6170f6b6f55..a0ba7ca8940 100644 --- a/tests/test_litellm/test_utils.py +++ b/tests/test_litellm/test_utils.py @@ -433,7 +433,7 @@ def test_anthropic_web_search_in_model_info(): "anthropic/claude-sonnet-4-5-20250929", "anthropic/claude-3-5-sonnet-20241022", "anthropic/claude-3-5-haiku-20241022", - "anthropic/claude-3-5-haiku-latest", + "anthropic/claude-haiku-4-5-20251001", ] for model in supported_models: from litellm.utils import get_model_info