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]

test: update test

Krrish Dholakia82948b9a1a6f
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 b995df2d445..74106b19b37 100644
--- a/tests/logging_callback_tests/langfuse_expected_request_body/completion.json
+++ b/tests/logging_callback_tests/langfuse_expected_request_body/completion.json
@@ -36,10 +36,10 @@
"model_id": null,
"cache_key": null,
"api_base": "https://api.openai.com",
- "response_cost": 5.4999999999999995e-05,
+ "response_cost": 3.5e-05,
"additional_headers": {}
},
- "litellm_response_cost": 5.4999999999999995e-05,
+ "litellm_response_cost": 3.5e-05,
"cache_hit": false,
"requester_metadata": {}
},
@@ -67,7 +67,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 348fe5956da..5a5a32de2eb 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
@@ -108,7 +108,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 b63bedf16a2..1da758d1db8 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
@@ -52,11 +52,11 @@
"model_id": null,
"cache_key": null,
"api_base": "https://api.openai.com",
- "response_cost": 5.4999999999999995e-05,
+ "response_cost": 3.5e-05,
"additional_headers": {},
"litellm_overhead_time_ms": null
},
- "litellm_response_cost": 5.4999999999999995e-05,
+ "litellm_response_cost": 3.5e-05,
"cache_hit": false,
"requester_metadata": {}
},
@@ -86,13 +86,13 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
- "cache_creation_input_tokens": 0,
- "cache_read_input_tokens": 0,
"input": 10,
- "output": 20
+ "output": 20,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0
}
},
"timestamp": "2025-01-22T17:19:11.235541Z"
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 f4242d7edc3..b01c73ffd88 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
@@ -57,7 +57,7 @@
"input": 10,
"output": 10,
"unit": "TOKENS",
- "totalCost": 3.5e-05
+ "totalCost": 1.9999999999999998e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 84ea9768f01..feb7aff80bd 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
@@ -72,7 +72,7 @@
"input": 10,
"output": 10,
"unit": "TOKENS",
- "totalCost": 3.5e-05
+ "totalCost": 1.9999999999999998e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 e7442ce0a02..d4a3f4a57a3 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
@@ -76,7 +76,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 04c24c8963a..d31ea5eb3c9 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
@@ -76,7 +76,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 a21ab058fcd..b9e8286dbf1 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
@@ -83,7 +83,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 3f400f65914..78358b021a1 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
@@ -75,7 +75,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 1873d4a6ea1..057278c001b 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
@@ -69,7 +69,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 34e3c9f8daf..53134281351 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
@@ -69,7 +69,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 1873d4a6ea1..057278c001b 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
@@ -69,7 +69,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 4d6ce12ec6d..a4dc890273d 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
@@ -75,7 +75,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 5e5edc795ec..616b64e1bc1 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
@@ -75,7 +75,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 7bbf4e4eeee..9a7b5833a83 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
@@ -79,7 +79,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,
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 fcdcb47aea5..c8addd47da0 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
@@ -83,7 +83,7 @@
"input": 10,
"output": 20,
"unit": "TOKENS",
- "totalCost": 5.4999999999999995e-05
+ "totalCost": 3.5e-05
},
"usageDetails": {
"cache_creation_input_tokens": 0,