This commit is contained in:
Zang Peiyu 2026-08-27 17:10:06 -05:00 committed by GitHub
commit 427f54ac29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 1 deletions

View file

@ -10943,8 +10943,8 @@ class Router:
"retry_after",
"fallbacks",
"context_window_fallbacks",
"retry_policy",
"model_group_retry_policy",
"retry_policy",
"model_group_alias",
"enable_weighted_failover",
"enable_tag_filtering",

View file

@ -2822,3 +2822,15 @@ def test_upsert_deployment_clears_stale_budget_config(monkeypatch):
router.upsert_deployment(deployment=unbudgeted)
assert budget_limiter._get_budget_config_for_deployment(model_id) is None
def test_update_router_config_accepts_retry_policy():
"""GH#31308: UpdateRouterConfig must accept retry_policy so
it is not silently dropped when set via UI or /config/update."""
from litellm.types.router import UpdateRouterConfig, RetryPolicy
config = UpdateRouterConfig(
retry_policy={"RateLimitErrorRetries": 3}
)
assert isinstance(config.retry_policy, RetryPolicy)
assert config.retry_policy.RateLimitErrorRetries == 3