mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-30 01:08:33 +00:00
* fix(guardrails): scan the system prompt and tool results in Bedrock during_call on /v1/messages A during_call Bedrock guardrail on /v1/messages now sends ApplyGuardrail the top-level system prompt and the tool_result blocks that pre_call already scans, following the guardrail's skip system and skip tool flags. * fix(guardrails): read the /v1/messages structure through a typed reader in the Bedrock guardrail * fix(guardrails): type the /v1/messages reader result as a read-only sequence The type discipline gate counts a mutable list in the reader protocol's return annotation. The handler's list still satisfies a Sequence return. * refactor(guardrails): call the /v1/messages structured reader directly in the Bedrock guardrail The Protocol-typed factory only existed to keep basedpyright from reporting the handler method as partly unknown. Main has since typed the handler, so the direct call adds no diagnostic and the single-use wrapper goes. |
||
|---|---|---|
| .. | ||
| guardrail_hooks | ||
| __init__.py | ||
| test_anthropic_sse.py | ||
| test_auto_router_compression.py | ||
| test_content_filter_path_traversal.py | ||
| test_content_utils.py | ||
| test_custom_code_security.py | ||
| test_deferred_guardrail_logging.py | ||
| test_endpoint_image_scan.py | ||
| test_guardrail_coverage.py | ||
| test_guardrail_endpoints.py | ||
| test_guardrail_helpers.py | ||
| test_guardrail_initializers.py | ||
| test_guardrail_load_balancing.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 | ||
| test_usage_tracking.py | ||