litellm/tests/test_litellm/proxy/policy_engine
devin-ai-integration[bot] 311d9bba37
perf(policy_engine): dedup attachments in one pass after sorting (#40883)
get_attached_policies_with_reasons rescanned the sorted matches with next() once
per distinct policy, which is quadratic and misses the one second budget past a
few thousand global attachments. Build a policy to broadest attachment map in one
pass instead, keeping the specificity sort and result order.

Co-authored-by: yucheng <yucheng@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-12 14:19:20 -07:00
..
__init__.py
test_attachment_registry.py perf(policy_engine): dedup attachments in one pass after sorting (#40883) 2026-09-12 14:19:20 -07:00
test_condition_evaluator.py
test_pipeline_executor.py Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_legacy_hook_streaming_pipeline_step 2026-09-09 15:52:48 -07:00
test_policy_engine_endpoints.py
test_policy_matcher.py
test_policy_resolver.py
test_policy_validator.py
test_policy_versioning.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_policy_versioning_e2e.py
test_response_retrieval.py fix(proxy): type the new pipeline tests and keep tag values out of the deferral warning 2026-09-08 19:59:09 -07:00