mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-21 00:21:49 +00:00
Post-call pipeline rewrites on buffered streams failed open on three shapes: chat streams with n > 1 (the rebuilt response collapsed every choice into index 0), streams that ended without a finish marker, and Responses streams whose final event carried no response envelope. The chat handler now rebuilds the ended stream one choice index at a time and writes each choice's rewrite back to that choice's buffered deltas. The Anthropic handler writes an unended stream's rewrite across its text deltas. The Responses handler spreads an envelope-less rewrite over the buffered output_text events, still failing open when a scanned event cannot be placed. Tool-call rewrites on n > 1 chat streams keep failing open. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_attachment_registry.py | ||
| test_condition_evaluator.py | ||
| test_pipeline_executor.py | ||
| test_policy_engine_endpoints.py | ||
| test_policy_matcher.py | ||
| test_policy_resolver.py | ||
| test_policy_validator.py | ||
| test_policy_versioning.py | ||
| test_policy_versioning_e2e.py | ||
| test_response_retrieval.py | ||