litellm/tests/test_litellm/router_utils
tin-berri cb8c734dbe
fix(ui): reject an auto-router keyword rule left empty instead of dropping it (#35705)
"Add keyword rule" seeds a row with no keywords, and the only check that a
rule carried one lived inside getSemanticConfigError, which returns early
when semantic keyword matching is off. Off is the default, so an unfilled
row fell through to serializeKeywordTierRules and was discarded on the way
to the payload; the create reported success and the rule was gone.

The row now reports the gap itself and the submit is withheld while one is
outstanding, on the create form and the edit modal alike, both reading
emptyKeywordTierRuleIndexes so the row named and the row marked cannot
differ. Enter commits a typed keyword: the dropdown is kept closed, which
left antd nothing for Enter to select, and submitting was what used to
supply the blur that saved the word.

The backend already refused such a rule, but only when the router built the
deployment, so a caller that sent one anyway got the row written, dropped on
reload, and a 500. The management write paths now parse the incoming
complexity_router_config with the router's own ComplexityRouterConfig, judged
on the config alone so a patch that writes one without naming a model is
covered too, and reject it with a 400 having persisted nothing.
2026-08-03 19:02:49 -07:00
..
pre_call_checks fix(router): take the lowest minimum across a model group, not the highest 2026-07-16 19:53:10 -07:00
test_add_retry_fallback_headers.py feat(router): add separate ITPM/OTPM deployment rate limits (#31952) 2026-07-05 21:58:35 +05:30
test_auto_router_model_naming.py fix(ui): reject an auto-router keyword rule left empty instead of dropping it (#35705) 2026-08-03 19:02:49 -07:00
test_cooldown_cache.py fix(cooldown_cache.py): mask error string to avoid leaking sensitive prompt data 2025-08-11 18:37:57 -07:00
test_fallback_event_handlers.py chore: litellm oss staging (#31185) 2026-06-26 09:17:44 -07:00
test_health_check_allowed_fails_integration.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_health_state_cache.py feat(router): add health-check-driven routing behind opt-in flag 2026-03-27 20:57:08 +05:30
test_router_health_check_routing.py Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
test_router_interactions_endpoints.py Gemini managed agents support (#28270) 2026-05-19 16:02:03 -07:00
test_router_utils_common_utils.py fix(proxy): apply key/team router_settings.model_group_alias (#35486) 2026-08-03 22:09:47 +00:00