fix _get_spend_logs_metadata

This commit is contained in:
Ishaan Jaffer
2025-11-06 17:08:53 -08:00
parent 8e73e11fc8
commit dc71eb12e3
3 changed files with 4 additions and 2 deletions
@@ -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",
)