mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
A guardrail modify_response verdict on a streaming request only produced a proper replacement on /v1/messages: the chat completions and Responses API translations had no build_block_sse_chunks, so the ModifyResponseException re-raised and surfaced as an in-stream 500 error frame (or a whole-request 500 in buffered mode) instead of the documented 200 replacement. Implement build_block_sse_chunks for both OpenAI translations: chat emits a content delta plus a finish_reason content_filter chunk with real usage; Responses emits the typed event sequence (standalone via build_synthetic_response_events pre-stream, or an output-item continuation under the in-progress response id mid-stream) ending in response.completed. |
||
|---|---|---|
| .. | ||
| base_responses_api.py | ||
| conftest.py | ||
| test_anthropic_responses_api.py | ||
| test_anthropic_tool_result_empty_call_id.py | ||
| test_anthropic_tool_result_fix.py | ||
| test_azure_responses_api.py | ||
| test_base_responses_api_streaming_iterator.py | ||
| test_google_ai_studio_responses_api.py | ||
| test_openai_responses_api.py | ||
| test_responses_hooks.py | ||