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 [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
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 fix(policy_engine): decide config policy suppression from fresh db query only 2026-07-30 16:01:57 -07:00
test_policy_matcher.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_policy_resolver.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_policy_validator.py fix(policies): reject non-existent team/key/model scope entries on attachment create (#32131) 2026-07-04 11:58:29 -07:00
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 style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
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