mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
test(complexity-router): vary only simple_medium in the override-floor test
The ascending-boundary check means simple_medium can no longer be moved on its own past the filled default under it. Carrying the fixture's other two boundaries through, rather than restating a bespoke set, keeps simple_medium the single variable the test is named for and drops two numbers a reader would have had to reverse engineer.
This commit is contained in:
parent
41ffc87ed7
commit
2fa9958e39
1 changed files with 9 additions and 6 deletions
|
|
@ -297,22 +297,25 @@ class TestReasoningMarkerScoring:
|
|||
assert tier == ComplexityTier.REASONING
|
||||
|
||||
def test_floor_defaults_to_simple_medium_and_follows_it(self, mock_router_instance, basic_config):
|
||||
"""Unset tracks simple_medium, so moving that boundary moves the floor with it."""
|
||||
"""Unset tracks simple_medium, so moving that boundary moves the floor with it.
|
||||
|
||||
Both arms carry the fixture's other two boundaries unchanged: simple_medium is the only
|
||||
variable, and boundaries must ascend, so the pair above it cannot be left to fill from
|
||||
shipped defaults that sit below the value under test.
|
||||
"""
|
||||
prompt = (
|
||||
"Give me the pros and cons, step by step, of moving our checkout service to an event-driven architecture."
|
||||
)
|
||||
boundaries = basic_config["tier_boundaries"]
|
||||
low = ComplexityRouter(
|
||||
model_name="test-complexity-router",
|
||||
litellm_router_instance=mock_router_instance,
|
||||
complexity_router_config={**basic_config, "tier_boundaries": {"simple_medium": 0.20}},
|
||||
complexity_router_config={**basic_config, "tier_boundaries": {**boundaries, "simple_medium": 0.20}},
|
||||
)
|
||||
high = ComplexityRouter(
|
||||
model_name="test-complexity-router",
|
||||
litellm_router_instance=mock_router_instance,
|
||||
complexity_router_config={
|
||||
**basic_config,
|
||||
"tier_boundaries": {"simple_medium": 0.30, "medium_complex": 0.35, "complex_reasoning": 0.50},
|
||||
},
|
||||
complexity_router_config={**basic_config, "tier_boundaries": {**boundaries, "simple_medium": 0.30}},
|
||||
)
|
||||
assert low._effective_reasoning_override_min_score() == 0.20
|
||||
assert high._effective_reasoning_override_min_score() == 0.30
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue