litellm/tests/e2e/llm_translation
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
..
realtime fix(bedrock): emit Nova Sonic realtime session.created on connect and session.updated on session.update (#34133) 2026-07-22 06:15:37 +00:00
conftest.py test(e2e): rename Gateway to ProxyClient and expose it as a session-scoped fixture (#33750) 2026-07-18 18:41:18 +00:00
endpoints_client.py test(e2e): cover google-native generateContent framing and prometheus queue time (#34650) 2026-08-12 01:28:26 +00:00
LLM_TRANSLATION_COVERAGE_MATRIX.md test(e2e): add vertex_ai passthrough spend-log coverage (#31781) 2026-07-02 17:32:46 -07:00
passthrough_client.py test(e2e): move load/perf testing out of the main suite and drop the vllm passthrough test (#35820) 2026-08-04 14:12:25 -07:00
test_audio_speech_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_audio_transcriptions_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_bedrock_native_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_bedrock_web_search_server_tool_e2e.py test(e2e): cover the Anthropic web_search server tool on Bedrock (#36443) 2026-08-10 17:38:08 -07:00
test_cache_control.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_chat_completions_contract_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_chat_completions_regression_e2e.py test(e2e): stop racing control-plane writes across the mcp, a2a, guardrail and passthrough suites (#34833) 2026-07-27 21:19:49 +00:00
test_chat_stream_contract_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_completions_endpoint_e2e.py test(e2e): cover legacy text /completions endpoint (#34431) 2026-08-04 13:48:07 -07:00
test_credential_messages_e2e.py test(e2e): cover credential-backed /v1/messages request (#33863) 2026-07-18 18:30:55 -07:00
test_custom_pricing_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_deepseek_reasoning_e2e.py test(e2e): point four suites at models the providers still serve (#34567) 2026-07-25 10:32:08 -07:00
test_embeddings_endpoint_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_files_batches_contract_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_google_native_e2e.py test(e2e): cover google-native generateContent framing and prometheus queue time (#34650) 2026-08-12 01:28:26 +00:00
test_image_edits_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_image_generation_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_messages_azure_foundry_e2e.py test(e2e): fail the run when a Rust gateway silently serves /messages through Python (#34208) 2026-07-22 14:43:13 -07:00
test_messages_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_messages_mid_conversation_system_e2e.py test(e2e): unblock the ui suite, fix the mcp registration race, park two known product bugs (#34853) 2026-07-27 19:20:57 -07:00
test_messages_mid_conversation_system_native_providers_e2e.py test(e2e): unblock the ui suite, fix the mcp registration race, park two known product bugs (#34853) 2026-07-27 19:20:57 -07:00
test_moderations_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_ocr_rust_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_passthrough_e2e.py test(e2e): add reproducers for passthrough and model budget gaps (#34657) 2026-08-11 18:15:34 -07:00
test_passthrough_headers_e2e.py test(e2e): skip passthrough headers test until stage can route custom paths to provider creds (#34980) 2026-07-28 11:36:09 -07:00
test_provider_features_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_realtime_http_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_rerank_e2e.py test(e2e): point four suites at models the providers still serve (#34567) 2026-07-25 10:32:08 -07:00
test_responses_bridge_streaming_e2e.py fix(responses_bridge): keep one chat completion id per stream and always stream completed responses 2026-07-24 20:09:05 +00:00
test_responses_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_responses_retrieve_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_vector_stores_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00
test_vertex_passthrough_e2e.py test(e2e): settle control-plane writes across every replica, not just one 2026-08-07 19:36:30 -07:00