mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-28 00:00:38 +00:00
* fix(proxy): send finish_reason null on every streamed chat chunk The proxy's chat completions stream left the finish_reason key out of every in-progress chunk, while OpenAI and Mistral send "finish_reason": null until the last one. The mistralai SDK marks the field required-nullable, so its clients failed on the first chunk. Both the fast and the slow chunk serializer now write the key on every choice, and every other None field stays omitted as before * fix(proxy): send NaN and Infinity in streamed chat chunks as null Chunks with a null finish_reason go through to_json, which wrote bare NaN and -Infinity where model_dump_json wrote null, so strict JSON parsers rejected a chunk carrying a -inf logprob. Both the to_json path and its json.dumps fallback now write null. * test(integration): expect finish_reason null on in-progress chat chunks --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| 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_stream_tool_argument_strings.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 | ||