mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
fix: persist retry_policy in UpdateRouterConfig
UpdateRouterConfig was missing the retry_policy field, causing it to be silently dropped when set via the Admin UI or /config/update. Fixes #31308
This commit is contained in:
parent
906897bebf
commit
4e0aa8ad0e
1 changed files with 11 additions and 0 deletions
|
|
@ -2833,3 +2833,14 @@ 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
|
||||
|
||||
config = UpdateRouterConfig(
|
||||
retry_policy={"RateLimitErrorRetries": 3}
|
||||
)
|
||||
assert config.retry_policy == {"RateLimitErrorRetries": 3}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue