diff --git a/tests/llm_translation/test_bedrock_completion.py b/tests/llm_translation/test_bedrock_completion.py index 29c2d26981..7c0db41d13 100644 --- a/tests/llm_translation/test_bedrock_completion.py +++ b/tests/llm_translation/test_bedrock_completion.py @@ -3350,7 +3350,8 @@ async def test_bedrock_converse__streaming_passthrough(monkeypatch): mock_callback.assert_called_once() print(mock_callback.call_args.kwargs.keys()) assert "response_cost" in mock_callback.call_args.kwargs["kwargs"] - assert mock_callback.call_args.kwargs["kwargs"]["response_cost"] > 0 + response_cost = mock_callback.call_args.kwargs["kwargs"]["response_cost"] + assert response_cost is not None and response_cost > 0 assert "standard_logging_object" in mock_callback.call_args.kwargs["kwargs"] diff --git a/tests/logging_callback_tests/test_langsmith_unit_test.py b/tests/logging_callback_tests/test_langsmith_unit_test.py index bde2b94457..17b854b52f 100644 --- a/tests/logging_callback_tests/test_langsmith_unit_test.py +++ b/tests/logging_callback_tests/test_langsmith_unit_test.py @@ -392,7 +392,6 @@ async def test_langsmith_key_based_logging(): "role": "assistant", "tool_calls": None, "function_call": None, - "provider_specific_fields": None, }, } ], diff --git a/tests/test_litellm/proxy/spend_tracking/test_spend_management_endpoints.py b/tests/test_litellm/proxy/spend_tracking/test_spend_management_endpoints.py index 57ec019e42..33e000143c 100644 --- a/tests/test_litellm/proxy/spend_tracking/test_spend_management_endpoints.py +++ b/tests/test_litellm/proxy/spend_tracking/test_spend_management_endpoints.py @@ -201,6 +201,10 @@ ignored_keys = [ "metadata.usage_object", "metadata.cold_storage_object_key", "metadata.additional_usage_values.prompt_tokens_details.cache_creation_tokens", + "metadata.additional_usage_values.completion_tokens_details", + "metadata.additional_usage_values.prompt_tokens_details", + "metadata.additional_usage_values.cache_creation_input_tokens", + "metadata.additional_usage_values.cache_read_input_tokens", "metadata.litellm_overhead_time_ms", "metadata.cost_breakdown", ] diff --git a/tests/test_litellm/test_router.py b/tests/test_litellm/test_router.py index ad023cf6b1..6279e96305 100644 --- a/tests/test_litellm/test_router.py +++ b/tests/test_litellm/test_router.py @@ -1200,9 +1200,7 @@ async def test_acompletion_streaming_disable_fallbacks_midstream(): print("\n=== Test 1: disable_fallbacks=True with original_exception ===") # Create an original exception to wrap - from litellm.llms.anthropic.chat.anthropic_chat_transformation import ( - AnthropicError, - ) + from litellm.llms.anthropic.common_utils import AnthropicError original_error = AnthropicError( status_code=500,