fix: remove duplicate retry_policy entry and fix test assertion

- Remove duplicate retry_policy in _allowed_settings (already present)
- Fix test assertion to compare RetryPolicy object instead of raw dict
This commit is contained in:
factnn 2026-07-07 01:26:30 +08:00
parent 7dcaf9118d
commit e2bf42f08e
2 changed files with 3 additions and 3 deletions

View file

@ -9735,7 +9735,6 @@ class Router:
"retry_after",
"fallbacks",
"context_window_fallbacks",
"retry_policy",
"model_group_retry_policy",
"retry_policy",
"model_group_alias",

View file

@ -2838,9 +2838,10 @@ def test_upsert_deployment_clears_stale_budget_config(monkeypatch):
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
from litellm.types.router import UpdateRouterConfig, RetryPolicy
config = UpdateRouterConfig(
retry_policy={"RateLimitErrorRetries": 3}
)
assert config.retry_policy == {"RateLimitErrorRetries": 3}
assert isinstance(config.retry_policy, RetryPolicy)
assert config.retry_policy.RateLimitErrorRetries == 3