diff --git a/tests/integration/contracts.json b/tests/integration/contracts.json index 04af53a6080..23ec7452583 100644 --- a/tests/integration/contracts.json +++ b/tests/integration/contracts.json @@ -559,7 +559,7 @@ "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-input_text]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], - "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-fallback_cache_read_at_input_rate]": [ + "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-fallback_cache_read_at_half_input_rate]": [ "quota_management.spend_tracking.cost_matrix.logs_cost" ], "tests/integration/cost_calculation/test_cost_tracking.py::test_case_bills_expected_cost[fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-stream]": [ diff --git a/tests/integration/cost_calculation/cost_tracking_case.py b/tests/integration/cost_calculation/cost_tracking_case.py index 830c2999fbf..baee004c062 100644 --- a/tests/integration/cost_calculation/cost_tracking_case.py +++ b/tests/integration/cost_calculation/cost_tracking_case.py @@ -296,7 +296,11 @@ def data_errors() -> tuple[str, ...]: for case in CASES if ( isinstance(case.expected, FailureExpected) - and (not isinstance(case.response, JsonResponse) or case.response.status < 400) + and ( + not isinstance(case.response, JsonResponse) + or not 400 <= case.response.status <= 599 + or not 400 <= case.expected.failure.status <= 599 + ) ) or ( not isinstance(case.expected, FailureExpected) diff --git a/tests/integration/cost_calculation/cost_tracking_cases.json b/tests/integration/cost_calculation/cost_tracking_cases.json index cea9c22577b..8f36e679e9f 100644 --- a/tests/integration/cost_calculation/cost_tracking_cases.json +++ b/tests/integration/cost_calculation/cost_tracking_cases.json @@ -7958,7 +7958,7 @@ } }, { - "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-fallback_cache_read_at_input_rate", + "name": "fireworks_ai-accounts-fireworks-models-deepseek-v4p1-flash-fallback_cache_read_at_half_input_rate", "covers": "quota_management.spend_tracking.cost_matrix.logs_cost", "model": "fireworks_ai/accounts/fireworks/models/deepseek-v4p1-flash", "request": { @@ -8014,9 +8014,10 @@ } }, "expected": { - "spend": 0.0021672, - "input_cost": 0.0019392, + "spend": 0.0012456, + "input_cost": 0.0010176, "output_cost": 0.000228, + "cache_read_cost": 0.0009216, "prompt_tokens": 12928, "completion_tokens": 380 }