diff --git a/tests/test_litellm/proxy/agent_session_endpoints/conftest.py b/tests/test_litellm/proxy/agent_session_endpoints/conftest.py index 7c76336608e..dde13368a49 100644 --- a/tests/test_litellm/proxy/agent_session_endpoints/conftest.py +++ b/tests/test_litellm/proxy/agent_session_endpoints/conftest.py @@ -61,6 +61,15 @@ def _matches(row: _Row, where: Optional[Dict[str, Any]]) -> bool: if not where: return True for key, expected in where.items(): + # Compound boolean operators used by cursor pagination. + if key == "AND": + if not all(_matches(row, sub) for sub in expected): + return False + continue + if key == "OR": + if not any(_matches(row, sub) for sub in expected): + return False + continue actual = getattr(row, key, None) if isinstance(expected, dict): if "in" in expected: