litellm/tests/e2e/logging
mubashir1osmani 4725cb4661
test(e2e): cover google-native generateContent framing and prometheus queue time (#34650)
* test(e2e): cover google-native generateContent framing and prometheus queue time

Adds live coverage for three shipped regressions that had none, all reached
through surfaces a customer drives from Google SDKs and operator dashboards.

The managed google-native route (`/v1beta/models/{model}:generateContent`) had
no harness support at all, so EndpointsClient gains generate_content and
stream_generate_content plus the request body models, and a new suite asserts
the two contracts that broke there: the response carries
x-litellm-response-cost so SDK traffic reconciles against spend (LIT-4076), and
the stream relays single-prefixed SSE frames with no OpenAI [DONE] terminator.
A doubled `data:` prefix, a leaked bytes literal, or the [DONE] sentinel each
fail the stream test; [DONE] absence is only asserted once real content has
arrived, because a first-chunk upstream error legitimately falls back to the
OpenAI error shape and does emit it.

The prometheus test pins litellm_request_queue_time_seconds to an actual
observation on our own key's series rather than to the family merely existing,
which is the distinction the original regression turned on: the histogram stayed
registered while nothing was ever written to it (LIT-2034).

Each assertion was mutation-checked against the live proxy; inverting the
[DONE] expectation, the cost-header expectation, or the metric name fails the
corresponding test.

* refactor(e2e): simplify google native coverage
2026-08-12 01:28:26 +00:00
..
conftest.py test(true_rabbit): cover passthrough headers, batch assume-role, gemini, vllm, bedrock guardrails, batch rate-limit mapping (#33843) 2026-07-20 16:15:55 -07:00
datadog_reader.py test(e2e): datadog log delivery for streamed routes, read back from the real datadog api (#33566) 2026-07-16 19:37:07 -07:00
logging_client.py test(e2e): settle control-plane writes across every replica, not just one 2026-08-07 19:36:30 -07:00
test_datadog_log_e2e.py test(e2e): rename Gateway to ProxyClient and expose it as a session-scoped fixture (#33750) 2026-07-18 18:41:18 +00:00
test_otel_trace_e2e.py fix(e2e): assert on the gen-AI span that served the stream, not the span count (#36582) 2026-08-11 17:49:44 -07:00
test_prometheus_cardinality_e2e.py test(e2e): make MCP and prometheus e2e tests robust to data-plane sync lag (#34854) 2026-07-27 19:22:52 -07:00
test_prometheus_queue_time_e2e.py test(e2e): cover google-native generateContent framing and prometheus queue time (#34650) 2026-08-12 01:28:26 +00:00
test_span_selection.py fix(e2e): assert on the gen-AI span that served the stream, not the span count (#36582) 2026-08-11 17:49:44 -07:00