litellm/tests/integration/observability
rhea-tk 65c8ce23f5
fix(proxy): send finish_reason null on every in-progress streamed chat chunk (#53876)
* 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>
2026-11-26 08:08:44 +00:00
..
_azure_storage_support.py
_langfuse_otel_metadata_support.py
_logging_only_scope_support.py
_openinference_support.py fix(proxy): send finish_reason null on every in-progress streamed chat chunk (#53876) 2026-11-26 08:08:44 +00:00
_s3_v2_support.py
_ternary_support.py
azure_dispatch_support.py
conftest.py
logging_worker_drain_canary.py
test_akto_logging_only.py
test_anthropic_cache_control_hook_real_io.py
test_anthropic_overloaded_failure_signals.py
test_apply_guardrail_endpoint.py
test_arize_key_credential_reference.py fix(proxy): normalize metadata logging and tolerate malformed stored values (#51719) 2026-11-23 10:57:37 -08:00
test_arize_otel_v2_openinference_chaos.py
test_arize_otel_v2_openinference_family.py
test_arize_otel_v2_openinference_modes.py
test_arize_otel_v2_openinference_sad_edge.py
test_arize_otel_v2_openinference_spans.py
test_azure_content_safety_audit.py
test_azure_content_safety_dispatch.py
test_azure_content_safety_dispatch_resilience.py
test_azure_content_safety_endpoints.py
test_azure_storage_chaos.py
test_azure_storage_client_ttl.py
test_azure_storage_file_names.py
test_batch_line_items_cold_storage.py
test_bedrock_converse_guardrail_rewrites.py
test_bedrock_converse_stream_post_call_guardrail.py
test_bedrock_error_request_id.py
test_bedrock_guardrail_attachments.py
test_bedrock_invoke_stream_post_call_guardrail.py test(integration): bill the Bedrock invoke outage burst by the tokens each cut-off stream logged (#53239) 2026-11-21 01:18:02 +00:00
test_cache_hit_guardrail_metrics.py
test_cache_hit_guardrail_metrics_chaos.py
test_callback_delivery.py
test_content_filter_logging_only.py
test_custom_logger_hook_counts.py
test_custom_logger_hook_counts_chaos.py
test_custom_logger_hook_counts_modes.py
test_custom_logger_hook_counts_post_call_block.py
test_custom_logger_hook_counts_vendors.py
test_custom_logger_redaction.py
test_datadog_logging_delivery.py
test_file_usage_counter_span.py
test_generic_guardrail_api_wire.py
test_generic_guardrail_num_retries.py
test_grayswan_wire.py
test_grayswan_wire_chaos.py
test_guardrail_attachment.py
test_guardrail_effects.py
test_guardrail_load_balancing.py
test_guardrail_pipeline_applied_header.py
test_guardrail_spend_log_redaction_marker.py fix(spend-logs): store no redaction marker in guardrail fields when prompts are not stored (#53912) 2026-11-25 17:12:14 -08:00
test_guardrail_stream_scope.py
test_guardrail_stream_scope_chaos.py
test_guardrail_stream_scope_matrix.py
test_guardrail_timeout_all_providers.py
test_langfuse_delivery.py fix(proxy): keep the prompt out of Langfuse model parameters for rejected requests (#54084) 2026-11-25 01:29:51 +00:00
test_langfuse_destination_span_scope.py
test_langfuse_otel_console_output.py
test_langfuse_otel_legacy_destinations.py
test_langfuse_otel_metadata_chaos.py
test_langfuse_otel_metadata_clients.py
test_langfuse_otel_metadata_destinations.py
test_langfuse_otel_metadata_identity.py
test_langfuse_otel_tenant_only.py
test_langfuse_otel_trace_fields.py
test_langfuse_otel_v2_environment.py
test_langsmith_logging_delivery.py
test_langtrace_delivery.py
test_logging_only_scope_chaos.py
test_logging_only_scope_config.py fix(spend-logs): store no redaction marker in guardrail fields when prompts are not stored (#53912) 2026-11-25 17:12:14 -08:00
test_logging_only_scope_runtime.py
test_logging_worker_drain.py
test_mixpanel_user_id.py feat(otel): add Mixpanel OpenTelemetry v2 preset callback (#49999) 2026-11-25 10:27:02 -08:00
test_otel_auto_router_model.py
test_otel_cache_hit_cost.py
test_otel_conversation_id.py
test_otel_destination_metadata_keys.py
test_otel_excluded_services.py
test_otel_excluded_services_matrix.py
test_otel_failed_attempts.py
test_otel_responses_provider.py
test_otel_team_capture_message_content.py
test_otel_team_request_metadata.py
test_otel_team_sampling_across_pods.py
test_otel_text_completion_choices.py
test_otel_trace_response_header.py
test_otel_v1_request_trace.py
test_ovalix_guardrail.py
test_panw_airs_block_masked_response.py
test_passthrough_guardrail_scan_text.py
test_passthrough_operation_name.py
test_passthrough_upstream_error_chaos.py
test_passthrough_upstream_error_visibility.py
test_presidio_entity_masking.py
test_presidio_masking_endpoints.py fix(proxy): count generateContent spend under its own endpoint (#52701) 2026-11-18 16:50:56 -08:00
test_presidio_overlapping_spans.py
test_presidio_streaming_output.py
test_prometheus_deployment_failure_api_provider.py
test_prometheus_project_alias_label.py
test_prometheus_provider_auth_failure.py test(integration): wait for the success series before the stored-credential 401 (#53460) 2026-11-21 15:14:09 -08:00
test_prometheus_provider_auth_failure_chaos.py
test_prometheus_request_metrics.py
test_prometheus_series_cap.py
test_prometheus_series_cap_chaos.py
test_prometheus_shared_custom_labels.py
test_raw_response_callback_delivery.py
test_realtime_guardrail_translation.py
test_s3_v2_flush_surfaces_rust.py
test_s3_v2_partition_granularity_rust.py
test_s3_v2_streaming_failure_dedupe_rust.py
test_s3_v2_upload_fanout_rust.py
test_signoz_delivery.py
test_straiker_v3_platform.py
test_stream_error_alert_api_base.py
test_ternary_focus_export.py
test_weave_key_scoped_delivery.py
test_wingback_guardrail.py
test_xecguard_wire.py