mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
* test(vertex_ai): cover a Gemini stream cut before any finish reason
A Gemini or Vertex stream that ends before any chunk names a finishReason
must reach the caller as an error on chat completions, /v1/messages and
/v1/responses, while a stream that names its finish still completes.
* fix(vertex_ai): fail a Gemini stream cut before its finish reason
Gemini streaming stamped finish_reason "stop" on every chunk that had no
finishReason, so the end-of-stream check from #47665 believed a finish had
arrived and a stream Google cut early completed as a normal "stop".
Streamed chunks now carry a finish reason only when the candidate sends one,
so a cut stream errors and router retries and fallbacks can act on it.
* fix(vertex_ai): treat Gemini's unspecified finish reason as no finish
Google documents FINISH_REASON_UNSPECIFIED as unused, so a stream whose
only finish reason is that value was cut too. Use the same check the
provider finish evidence already uses, so both agree.
* revert(vertex_ai): keep Gemini's unspecified finish reason as a finish
Reverts
|
||
|---|---|---|
| .. | ||
| faked_responses_case.py | ||
| test_assistants_evals_stream.py | ||
| test_azure_streaming_function_calls.py | ||
| test_background_response_polling_cancel.py | ||
| test_bedrock_guardrail_background_stream_scan.py | ||
| test_chat_stream_guardrail_error_events.py | ||
| test_decision_model_buffering.py | ||
| test_decision_model_pipeline_buffering.py | ||
| test_fake_stream_reasoning_wire.py | ||
| test_faked_responses_stream_bridges.py | ||
| test_faked_responses_stream_cache_replay.py | ||
| test_faked_responses_stream_chaos.py | ||
| test_faked_responses_stream_guardrail_blocks.py | ||
| test_faked_responses_stream_items.py | ||
| test_file_content_streaming.py | ||
| test_google_genai_stream_usage_settings_wire.py | ||
| test_interception_converted_stream_options.py | ||
| test_live_disconnect_failure_callback.py | ||
| test_mid_stream_fallback_continuation.py | ||
| test_noma_v2_streaming_settings.py | ||
| test_openai_like_stream_usage_wire.py | ||
| test_openai_sdk_plain_chunk_fields.py | ||
| test_openai_stream_passthrough_fields.py | ||
| test_responses_bridge_stream_chaos.py | ||
| test_responses_bridge_stream_errors.py | ||
| test_responses_top_level_error_events.py | ||
| test_stream_clean_eof_without_finish_reason.py | ||
| test_stream_contracts.py | ||
| test_stream_open_error_provider_headers_proxy.py | ||
| test_stream_parallel_slot_release.py | ||
| test_text_completion_stream_guardrail_rebuild.py | ||
| test_ttft_keepalive.py | ||