Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix lf tests

Ishaan Jaffer1655a9aea81f
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion.json
index 5f62b828119..50f4db61f9a 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion.json
@@ -66,7 +66,9 @@
"endTime": "2025-01-16T11:28:55.124353-08:00",
"completionStartTime": "2025-01-16T11:28:55.124353-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -74,12 +76,12 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "input": 10,
- "output": 20,
- "total": 30,
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0
- },
+ "input": 10,
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
+ },
"traceId": "litellm-test-6a51ae70-a4e7-499e-afcd-dce2a3b31850"
},
"timestamp": "2025-01-16T19:28:55.125258Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_bedrock_call.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_bedrock_call.json
index d9f52477fc8..26b712c1cf2 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_bedrock_call.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_bedrock_call.json
@@ -65,11 +65,12 @@
"totalCost": 0.00018
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
- "input": 10,
- "output": 10
- }
+ "input": 10,
+ "output": 10,
+ "total": 20,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
+ }
},
"timestamp": "2025-05-26T21:13:16.797156Z"
}
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_complex_metadata.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_complex_metadata.json
index 5a5a32de2eb..62cb01dfbfd 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_complex_metadata.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_complex_metadata.json
@@ -78,7 +78,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -103,7 +106,9 @@
"endTime": "2025-01-22T09:27:51.702048-08:00",
"completionStartTime": "2025-01-22T09:27:51.702048-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -111,10 +116,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:27:51.703046Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_langfuse_metadata.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_langfuse_metadata.json
index 1da758d1db8..a986a5a8aee 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_langfuse_metadata.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_langfuse_metadata.json
@@ -54,7 +54,10 @@
"api_base": "https://api.openai.com",
"response_cost": 3.5e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 3.5e-05,
"cache_hit": false,
@@ -81,7 +84,9 @@
"endTime": "2025-01-22T09:19:11.234200-08:00",
"completionStartTime": "2025-01-22T09:19:11.234200-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -91,6 +96,7 @@
"usageDetails": {
"input": 10,
"output": 20,
+ "total": 30,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_no_choices.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_no_choices.json
index b01c73ffd88..ff8419ee392 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_no_choices.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_no_choices.json
@@ -33,7 +33,10 @@
"api_base": "https://api.openai.com",
"response_cost": 3.5e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 3.5e-05,
"cache_hit": false,
@@ -52,7 +55,9 @@
"endTime": "2025-02-06T16:23:27.644253-08:00",
"completionStartTime": "2025-02-06T16:23:27.644253-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 10,
@@ -60,10 +65,11 @@
"totalCost": 1.9999999999999998e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 10
+ "output": 10,
+ "total": 20,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-02-07T00:23:27.670175Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_router.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_router.json
index feb7aff80bd..df99b11d26b 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_router.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_router.json
@@ -75,10 +75,11 @@
"totalCost": 1.9999999999999998e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 10
+ "output": 10,
+ "total": 20,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-05-24T17:01:19.408586Z"
@@ -91,4 +92,4 @@
"sdk_version": "2.44.1",
"public_key": "pk-lf-3bfc4db9-217f-48e9-92e0-142566e3c204"
}
-}
+}
\ No newline at end of file
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_tags.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_tags.json
index d4a3f4a57a3..f4c99a4b452 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_tags.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_tags.json
@@ -46,7 +46,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -71,7 +74,9 @@
"endTime": "2025-01-22T07:31:28.962389-08:00",
"completionStartTime": "2025-01-22T07:31:28.962389-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -79,10 +84,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T15:31:28.964179Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_tags_stream.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_tags_stream.json
index d31ea5eb3c9..f3b660dc678 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_tags_stream.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_tags_stream.json
@@ -46,7 +46,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -71,7 +74,9 @@
"endTime": "2025-01-22T08:38:26.015666-08:00",
"completionStartTime": "2025-01-22T08:38:26.015666-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -79,10 +84,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T16:38:26.017252Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_vertex_call.json b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_vertex_call.json
index 3e27f5b54b4..b6c11f96953 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_vertex_call.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion_with_vertex_call.json
@@ -63,10 +63,11 @@
"totalCost": 7.5e-06
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 10
+ "output": 10,
+ "total": 20,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-05-26T21:15:40.610953Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/complex_metadata.json b/tests/logging_callback_tests/langfuse_expected_request_body/complex_metadata.json
index b9e8286dbf1..51f7ffa60a9 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/complex_metadata.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/complex_metadata.json
@@ -53,7 +53,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -78,7 +81,9 @@
"endTime": "2025-01-22T09:59:39.365756-08:00",
"completionStartTime": "2025-01-22T09:59:39.365756-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -86,10 +91,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:59:39.368310Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/complex_metadata_2.json b/tests/logging_callback_tests/langfuse_expected_request_body/complex_metadata_2.json
index 78358b021a1..5bd15e98cdc 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/complex_metadata_2.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/complex_metadata_2.json
@@ -45,7 +45,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -70,7 +73,9 @@
"endTime": "2025-01-22T10:06:50.958374-08:00",
"completionStartTime": "2025-01-22T10:06:50.958374-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -78,10 +83,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T18:06:50.959850Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/empty_metadata.json b/tests/logging_callback_tests/langfuse_expected_request_body/empty_metadata.json
index 057278c001b..803fe752708 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/empty_metadata.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/empty_metadata.json
@@ -39,7 +39,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -64,7 +67,9 @@
"endTime": "2025-01-22T09:59:32.880691-08:00",
"completionStartTime": "2025-01-22T09:59:32.880691-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -72,10 +77,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:59:32.889548Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/metadata_with_function.json b/tests/logging_callback_tests/langfuse_expected_request_body/metadata_with_function.json
index 53134281351..b9ac7aecba3 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/metadata_with_function.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/metadata_with_function.json
@@ -39,7 +39,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -64,7 +67,9 @@
"endTime": "2025-01-22T09:59:36.161959-08:00",
"completionStartTime": "2025-01-22T09:59:36.161959-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -72,10 +77,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:59:36.162997Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/metadata_with_lock.json b/tests/logging_callback_tests/langfuse_expected_request_body/metadata_with_lock.json
index 057278c001b..803fe752708 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/metadata_with_lock.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/metadata_with_lock.json
@@ -39,7 +39,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -64,7 +67,9 @@
"endTime": "2025-01-22T09:59:32.880691-08:00",
"completionStartTime": "2025-01-22T09:59:32.880691-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -72,10 +77,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:59:32.889548Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/nested_metadata.json b/tests/logging_callback_tests/langfuse_expected_request_body/nested_metadata.json
index a4dc890273d..aec7f2ab868 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/nested_metadata.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/nested_metadata.json
@@ -45,7 +45,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -70,7 +73,9 @@
"endTime": "2025-01-22T09:55:28.853979-08:00",
"completionStartTime": "2025-01-22T09:55:28.853979-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -78,10 +83,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:55:28.855732Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata.json b/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata.json
index 616b64e1bc1..a05595299df 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata.json
@@ -45,7 +45,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -70,7 +73,9 @@
"endTime": "2025-01-22T09:53:53.753431-08:00",
"completionStartTime": "2025-01-22T09:53:53.753431-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -78,10 +83,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:53:53.754511Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata2.json b/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata2.json
index 9a7b5833a83..769ab97d598 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata2.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata2.json
@@ -49,7 +49,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -74,7 +77,9 @@
"endTime": "2025-01-22T09:56:35.476236-08:00",
"completionStartTime": "2025-01-22T09:56:35.476236-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -82,10 +87,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:56:35.478171Z"
diff --git a/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata3.json b/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata3.json
index c8addd47da0..0c41f0fc802 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata3.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/simple_metadata3.json
@@ -53,7 +53,10 @@
"api_base": "https://api.openai.com",
"response_cost": 5.4999999999999995e-05,
"additional_headers": {},
- "litellm_overhead_time_ms": null
+ "litellm_overhead_time_ms": null,
+ "batch_models": null,
+ "litellm_model_name": "gpt-3.5-turbo",
+ "usage_object": null
},
"litellm_response_cost": 5.4999999999999995e-05,
"cache_hit": false,
@@ -78,7 +81,9 @@
"endTime": "2025-01-22T09:56:38.785762-08:00",
"completionStartTime": "2025-01-22T09:56:38.785762-08:00",
"model": "gpt-3.5-turbo",
- "modelParameters": {"extra_body": "{}"},
+ "modelParameters": {
+ "extra_body": "{}"
+ },
"usage": {
"input": 10,
"output": 20,
@@ -86,10 +91,11 @@
"totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "total": 30,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:56:38.787196Z"