litellm/tests/test_litellm/proxy/guardrails
tin-berri 0315dd6f58
fix(headroom): inject headroom_retrieve only for service-declared ccr_hashes and keep assistant content blocks intact (#39974)
The retrieve tool was injected whenever any hash=<24hex> string appeared in the
restored conversation, including protected rows and caller-authored text, so a
git SHA in a tool result registered a bogus hash and billed a useless retrieval
round trip on every later turn. The compression service reports the hashes it
actually stored in ccr_hashes; that field is now the only source, validated to
the service's own 12 to 24 hex grammar before it reaches the retrieve URL.

Assistant rows are no longer flattened to strings before compression: the
service protects assistant text blocks but has no gate for assistant strings,
so the model's own earlier tables came back as a schema line plus CSV.

Adds ccr_retrieval (default true) so operators on a marker-free sidecar can
turn the retrieval loop off entirely.
2026-09-05 17:58:18 -07:00
..
guardrail_hooks fix(headroom): inject headroom_retrieve only for service-declared ccr_hashes and keep assistant content blocks intact (#39974) 2026-09-05 17:58:18 -07:00
test_auto_router_compression.py docs(auto-router compression): cut the explanatory comments back 2026-09-05 11:33:21 -07:00
test_content_filter_path_traversal.py Litellm OSS Staging 010626 (#29422) 2026-06-01 21:42:51 -07:00
test_content_utils.py feat(guardrails): add inspect_embeddings toggle for AIM and Cato (#39918) 2026-09-05 17:15:46 -07:00
test_custom_code_security.py feat(guardrails): add non-blocking flag() verdict to custom code guardrails (#39728) 2026-09-05 13:08:03 -07:00
test_deferred_guardrail_logging.py fix(guardrails): unwrap HiddenParamsAsyncIteratorWrapper before deferred dispatch class sniffing 2026-08-29 02:30:34 -07:00
test_guardrail_coverage.py feat(guardrails): add Lakera v2 skip-message honoring and advisory (inject_system_message) mode (#34940) 2026-08-28 14:13:49 -07:00
test_guardrail_endpoints.py feat(guardrails): add inspect_embeddings toggle for AIM and Cato (#39918) 2026-09-05 17:15:46 -07:00
test_guardrail_registry.py Merge pull request #39243 from BerriAI/litellm_fix_guardrail_event_hook_resync 2026-09-03 14:37:52 -07:00
test_init_guardrails.py feat(guardrails): add Lakera v2 skip-message honoring and advisory (inject_system_message) mode (#34940) 2026-08-28 14:13:49 -07:00
test_llm_as_a_judge.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_mcp_jwt_signer.py fix(mcp): JWT on tools/list and REST tools/call server resolution (#28227) 2026-05-20 13:31:44 -07:00
test_pillar_guardrails.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_prompt_security_guardrails.py fix(guardrails): configure Prompt Security file timeout policy (#38083) 2026-08-31 12:05:57 -07:00
test_qostodian_nexus_guardrail.py test: enforce F811 so a duplicate definition cannot silently replace the first 2026-08-21 12:06:19 -07:00
test_usage_endpoints.py Merge pull request #39853 from BerriAI/litellm_guardrail_usage_cost_ui 2026-09-05 14:41:11 -07:00
test_usage_tracking.py feat(guardrails): add non-blocking flag() verdict to custom code guardrails (#39728) 2026-09-05 13:08:03 -07:00