mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
* fix(guardrails): scan and re-emit raw Anthropic SSE streams in the bedrock post-call hook * fix(guardrails): keep upstream id and model on a blocked Anthropic stream * fix(guardrails): deliver a blocked Anthropic stream as an error frame * fix(guardrails): deliver an unscannable Anthropic stream as an error frame * fix(guardrails): emit the guardrail block detail as JSON in the stream error frame * fix(guardrails): deliver an Anthropic block through the shared block-SSE builder * fix(guardrails): keep the shared SSE assembler behavior-identical for existing callers * fix(guardrails): keep the stream error message a string and drop an unreachable branch * chore(guardrails): drop a comment that repeated its own docstring * fix(guardrails): let bedrock service failures keep their status instead of framing them as blocks * fix(guardrails): key the streamed block decision on status, not detail shape InvokeGuardrailChecks details a Mapping on its 500 for an unparseable response, so a detail-shape test read that outage as a policy block and framed it as a 200 guardrail_error. Both block sites raise 400, so gate on the status too. * refactor(guardrails): narrow the SSE error-frame helper to the input it actually takes Both callers pass a string, so the Mapping overload and its json.dumps branch were unreachable. Folds the block branch's narrative comment into the rebind suppressions that already carry a reason. |
||
|---|---|---|
| .. | ||
| guardrail_hooks | ||
| test_content_filter_path_traversal.py | ||
| test_content_utils.py | ||
| test_custom_code_security.py | ||
| test_deferred_guardrail_logging.py | ||
| test_guardrail_coverage.py | ||
| test_guardrail_endpoints.py | ||
| test_guardrail_registry.py | ||
| test_init_guardrails.py | ||
| test_llm_as_a_judge.py | ||
| test_mcp_jwt_signer.py | ||
| test_pillar_guardrails.py | ||
| test_prompt_security_guardrails.py | ||
| test_qostodian_nexus_guardrail.py | ||
| test_usage_endpoints.py | ||