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(e2e): type the wire-shape parametrize ids callback

kerry5507de326e3e
diff --git a/tests/e2e/cost_calculation/test_wire_formats_e2e.py b/tests/e2e/cost_calculation/test_wire_formats_e2e.py
index 3c6c34b24fb..4da7b31a6ef 100644
--- a/tests/e2e/cost_calculation/test_wire_formats_e2e.py
+++ b/tests/e2e/cost_calculation/test_wire_formats_e2e.py
@@ -144,6 +144,10 @@ _SHAPES: Final[tuple[tuple[str, str, Case], ...]] = (
)
+def _shape_id(entry: tuple[str, str, Case]) -> str:
+ return entry[0]
+
+
class TestWireFormats:
@pytest.mark.parametrize("wire", tuple(_WIRE_USAGE))
@pytest.mark.covers("quota_management.spend_tracking.scripted_wire.logs_cost")
@@ -237,7 +241,7 @@ class TestWireFormats:
)
cost_rows.assert_total_is_sum_of_components(row)
- @pytest.mark.parametrize("shape_wire_case", _SHAPES, ids=lambda entry: entry[0])
+ @pytest.mark.parametrize("shape_wire_case", _SHAPES, ids=_shape_id)
@pytest.mark.covers("quota_management.spend_tracking.scripted_wire.logs_cost")
def test_response_shape_bills_reported_usage(
self,