litellm/tests/unit/proxy/guardrails/guardrail_hooks
devin-ai-integration[bot] 888686d858
test(headroom): pin that SDK-echoed null tool_calls never reach /v1/compress (#39667)
* fix(headroom): drop null tool_calls before calling /v1/compress

headroom-ai 0.27.0 through 0.30.0 iterate msg.get("tool_calls", []) and fail
with 'NoneType' object is not iterable when an assistant row carries an explicit
tool_calls: null, which the fail-closed guardrail then surfaces as a 502. Strip
the null key from rows sent to the compression service; real tool_calls lists
are forwarded unchanged

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(headroom): pin that SDK-echoed null tool_calls never reach /v1/compress

Main now withholds every assistant row from /v1/compress (#39974), so the
null tool_calls strip added here never runs on a row headroom-ai 0.27-0.30
fails on. Drop the strip and pin the customer's history shape through the
public OpenAI chat translation handler instead.

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: yucheng-berri <293926326+yucheng-berri@users.noreply.github.com>
2026-10-10 17:29:46 -07:00
..
akto feat(guardrails): support logging_only mode for the Akto guardrail (#45461) 2026-10-08 17:28:08 -07:00
aporia_ai refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
azure fix(guardrails): restore Azure guardrail get_user_prompt dispatch and allow logging (#44067) 2026-10-01 23:30:32 -07:00
content_filter refactor(types): replace Any with proven types in 157 files (#44798) 2026-10-06 15:31:54 +00:00
dynamoai test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
guardrails_ai test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
javelin test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
litellm_content_filter test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
noma refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
openai test: move offline proxy auth, hook, spend and pass-through tests to tests/unit (#45568) 2026-10-09 09:49:13 -07:00
semantic_guard test: move the unit half of 126 mixed legacy files into tests/unit (#45090) 2026-10-07 14:07:43 -07:00
unified_guardrails fix(guardrails): scan or refuse attachments in the bedrock guardrail (#43383) 2026-10-10 16:48:37 -07:00
zscaler_ai_guard test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
__init__.py
_cisco_ai_defense_test_utils.py
code_execution_compliance_dataset.json
test_agent_365.py feat(mcp): hand listed-tool description and input schema to pre-call hooks per caller (#41162) 2026-10-04 00:53:58 -07:00
test_aim.py test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
test_alice.py
test_bedrock_guardrails.py fix(guardrails): scan or refuse attachments in the bedrock guardrail (#43383) 2026-10-10 16:48:37 -07:00
test_bedrock_invoke_guardrail_checks.py
test_block_code_execution.py
test_block_code_execution_compliance.py
test_cato_networks.py
test_cisco_ai_defense_chat.py
test_cisco_ai_defense_mcp.py
test_compresr.py
test_conduct.py
test_crowdstrike_aidr.py
test_custom_code_bounded_execution.py
test_decision_model.py feat(guardrails): add decision model guardrail with Admin UI flow (#45663) 2026-10-10 16:00:27 -07:00
test_deepkeep.py test: move the unit half of 126 mixed legacy files into tests/unit (#45090) 2026-10-07 14:07:43 -07:00
test_dynamoai.py
test_enkryptai.py
test_generic_guardrail_api.py feat(policy-engine): stream detect-only post_call pipeline steps live when buffering is off (#45516) 2026-10-09 15:46:51 -07:00
test_grayswan.py
test_headroom.py test(headroom): pin that SDK-echoed null tool_calls never reach /v1/compress (#39667) 2026-10-10 17:29:46 -07:00
test_hiddenlayer.py fix(guardrails): avoid blocking the event loop during HiddenLayer JWT refresh (#45437) 2026-10-09 22:29:24 -07:00
test_javelin.py
test_lakera_ai_v2.py test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
test_lasso.py
test_llm_shield_proxy.py refactor: remove fresh tech debt from the 2026-10-05 window (#44821) 2026-10-06 08:33:39 +00:00
test_mcp_end_user_permission.py
test_mcp_security.py fix(mcp): keep worker MCP configurations consistent via a catalog revision (#42568) 2026-10-06 18:21:29 -07:00
test_microsoft_purview.py
test_model_armor.py
test_noma.py
test_noma_v2.py
test_onyx.py
test_ovalix.py
test_pangea.py
test_panw_prisma_airs.py fix(security): remove the publicly known master key from the repo (#44718) 2026-10-06 10:55:24 -07:00
test_presidio.py test: move 76 live top-level tests to offline unit and integration coverage (#45352) 2026-10-08 10:33:35 -07:00
test_presidio_union_fix.py
test_promptguard.py
test_qualifire.py
test_repelloai.py
test_response_rejection_guardrail_code.py
test_singulr.py
test_straiker.py fix(security): remove the publicly known master key from the repo (#44718) 2026-10-06 10:55:24 -07:00
test_structured_messages_writeback.py
test_tool_permission.py
test_tool_policy_guardrail.py
test_typesafe.py
test_vigil_guard.py
test_xecguard.py