From d3ff68f0c3a64a3ccfe6d3a82c4aa912bc24e70a Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Sun, 9 Aug 2026 00:50:50 +0000 Subject: [PATCH] test(routing_groups): cover selector build failure returning the error Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../router_strategy/test_router_routing_groups.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_litellm/router_strategy/test_router_routing_groups.py b/tests/test_litellm/router_strategy/test_router_routing_groups.py index c4d667a6af9..4ca0d36c00d 100644 --- a/tests/test_litellm/router_strategy/test_router_routing_groups.py +++ b/tests/test_litellm/router_strategy/test_router_routing_groups.py @@ -10,6 +10,7 @@ import sys from unittest.mock import patch import pytest +from pydantic import ValidationError sys.path.insert(0, os.path.abspath("../..")) @@ -815,3 +816,14 @@ def test_unbuildable_group_selector_keeps_previous_groups(): assert router._model_to_group == {"filtered-model": "g1"} assert router._group_selectors["g1"]["latency-based-routing"] is selector assert sum(1 for cb in litellm.callbacks if type(cb) is type(selector)) == 1 + assert isinstance( + router._try_build_group_selector( + RoutingGroup( + group_name="g2", + models=["other-model"], + routing_strategy="latency-based-routing", + routing_strategy_args={"ttl": "not-a-number"}, + ) + ), + ValidationError, + )