litellm/tests/test_litellm/proxy/guardrails
devin-ai-integration[bot] 7210403e23
fix(mcp): apply post-call rewrites without stale structured output (#41530)
* fix(mcp): apply async_post_mcp_tool_call_hook content changes to the tool result

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

* fix(mcp): drop structuredContent when a post-call hook rewrites tool content

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

* fix(mcp): satisfy type discipline and result contract

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

* test(mcp): document internal logging patch

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

* fix(mcp): avoid Final assignments inside callback loops

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

* fix(mcp): run every post-call hook and chain the rewritten content

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

* chore(mcp): credit the original fix from #33403

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

* test(mcp): cover post-call logging fallback paths

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

* test(mcp): cover proxy hook logging context

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

* fix(mcp): preserve native structured guardrail replacements

* fix(mcp): invalidate stale structure after direct content edits

* fix(mcp): reconcile direct edits after callback exceptions

* fix(mcp): preserve successful in-place callback rewrites

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: eric <mitrecx@163.com>
Co-authored-by: Joshua Valluru <326636767+joshua-berri@users.noreply.github.com>
2026-09-22 13:44:25 -07:00
..
guardrail_hooks fix(mcp): apply post-call rewrites without stale structured output (#41530) 2026-09-22 13:44:25 -07:00
test_auto_router_compression.py fix(router): resolve team-scoped auto-routers by their public name (#40432) 2026-09-09 15:53:05 -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 fix(guardrails): carry MCP caller identity in synthetic metadata instead of trusting top-level fields 2026-09-14 21:37:44 +00:00
test_deferred_guardrail_logging.py fix(cost): resolve a missing 1h cache write rate after off-peak pricing 2026-09-14 21:46:33 -07:00
test_guardrail_coverage.py fix(enterprise): resolve openai_moderations model at call time and default to omni-moderation-latest 2026-09-18 23:06:47 +00:00
test_guardrail_endpoints.py fix(guardrails): hold tool-call windows until the final scan and expose Bedrock streaming flags to the UI 2026-09-16 18:30:12 +00: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 fix(guardrails): treat tag-based Mode as MCP-only when all hooks are MCP hooks 2026-09-16 16:31:44 +00:00
test_llm_as_a_judge.py fix(guardrails): only honor the judge call-origin stamp on logging_only in llm_as_a_judge 2026-09-16 01:05:53 +00: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): stream Prompt Security post_call redactions in incremental_diff mode 2026-09-17 01:06:12 +00: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 Revert "refactor(guardrails): rename scoped-out evaluation status from not_run to skipped" 2026-09-14 23:46:09 +00:00
test_usage_tracking.py Revert "refactor(guardrails): rename scoped-out evaluation status from not_run to skipped" 2026-09-14 23:46:09 +00:00