litellm/tests/test_litellm/proxy/guardrails
michelligabriele 0057452485 fix(proxy): guard streaming deferred init with try/finally, fix test imports
Wrap _run_deferred_stream_guardrails initialization (UnifiedLLMGuardrails
constructor and _check_and_merge_model_level_guardrails) in try/finally
so logging always fires even if init throws. Prevents silent logging loss
on transient errors.

Move fastapi.HTTPException import from module-level to local test-function
scope. Add test_logging_fires_even_if_guardrail_init_raises to verify the
try/finally guard.
2026-03-19 18:00:49 +01:00
..
guardrail_hooks fix: Register DynamoAI guardrail initializer and enum entry (#23752) 2026-03-16 22:24:29 -07:00
test_deferred_guardrail_logging.py fix(proxy): guard streaming deferred init with try/finally, fix test imports 2026-03-19 18:00:49 +01:00
test_guardrail_endpoints.py Agent Tracing - support context_id based trace id propogation + nested llm calls (#22626) 2026-03-03 18:19:12 -08:00
test_guardrail_registry.py Add Noma guardrails v2 based on custom guardrails (#21400) 2026-02-23 05:05:27 -08:00
test_init_guardrails.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_mcp_jwt_signer.py [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
test_pillar_guardrails.py fix: properly reload litellm in setup_and_teardown fixture 2026-02-17 21:29:13 -03:00
test_prompt_security_guardrails.py fixing prompt-security's guardrail implementation (#19374) 2026-01-21 20:09:40 -08:00