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 all 130126 tests

Sameer Kankute7dbf09cb12df
diff --git a/tests/llm_translation/test_bedrock_completion.py b/tests/llm_translation/test_bedrock_completion.py
index 29c2d26981c..7c0db41d13a 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 bde2b944579..17b854b52f2 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 57ec019e420..33e000143c8 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 ad023cf6b1f..6279e96305f 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,