mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-07 23:08:07 +00:00
fix _get_spend_logs_metadata
This commit is contained in:
@@ -51,7 +51,7 @@ def _get_spend_logs_metadata(
|
||||
vector_store_request_metadata: Optional[
|
||||
List[StandardLoggingVectorStoreRequest]
|
||||
] = None,
|
||||
guardrail_information: Optional[list[StandardLoggingGuardrailInformation]] = None,
|
||||
guardrail_information: Optional[List[StandardLoggingGuardrailInformation]] = None,
|
||||
usage_object: Optional[dict] = None,
|
||||
model_map_information: Optional[StandardLoggingModelInformation] = None,
|
||||
cold_storage_object_key: Optional[str] = None,
|
||||
|
||||
@@ -465,6 +465,7 @@ async def test_noma_guardrail_status_blocked():
|
||||
mock_response.status_code = 200
|
||||
mock_response.json.return_value = {
|
||||
"verdict": False,
|
||||
"aggregatedScanResult": True,
|
||||
"originalResponse": {
|
||||
"prompt": {
|
||||
"topicDetector": {"harmful": {"result": True}}
|
||||
@@ -549,6 +550,7 @@ async def test_noma_guardrail_status_success():
|
||||
mock_response.status_code = 200
|
||||
mock_response.json.return_value = {
|
||||
"verdict": True,
|
||||
"aggregatedScanResult": False,
|
||||
"originalResponse": {"prompt": {}}
|
||||
}
|
||||
mock_response.raise_for_status = MagicMock()
|
||||
|
||||
@@ -682,7 +682,7 @@ async def test_e2e_generate_cold_storage_object_key_with_logger_no_s3_path():
|
||||
# Verify the S3 function was called with empty s3_path (fallback)
|
||||
mock_get_s3_key.assert_called_once_with(
|
||||
s3_path="", # Should fall back to empty string
|
||||
team_alias_prefix="",
|
||||
prefix="",
|
||||
start_time=start_time,
|
||||
s3_file_name="time-10-30-45-123456_chatcmpl-test-12345",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user