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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(e2e): define SpendTagsResponse/TagSpend so spend suite collects
mubashir1osmani70785b9b6a43
diff --git a/tests/e2e/models.py b/tests/e2e/models.pyindex 0d0352df9af..b5b7865cb08 100644--- a/tests/e2e/models.py+++ b/tests/e2e/models.py@@ -194,6 +194,20 @@ class SpendCalculateResponse(BaseModel):cost: float+# ---------- spend tags ----------+++class TagSpend(BaseModel):+ individual_request_tag: str | None = None+ log_count: int | None = None+ total_spend: float | None = None+++class SpendTagsResponse(RootModel[list[TagSpend]]):+ """GET /spend/tags answers with a bare array of per-tag aggregates, not an+ object wrapping them (that's /global/spend/tags). Read the rows off .root."""++# ---------- route probing ----------diff --git a/tests/e2e/spend_tracking/spend_e2e_client.py b/tests/e2e/spend_tracking/spend_e2e_client.pyindex 0ddacce4299..4f3bc9a461e 100644--- a/tests/e2e/spend_tracking/spend_e2e_client.py+++ b/tests/e2e/spend_tracking/spend_e2e_client.py@@ -151,7 +151,7 @@ class SpendClient:)match result:case Success(data=data):- return data.spend_per_tag or []+ return data.rootcase _:return []