Skip to content

fix(router): persist and apply retry_policy via update_settings (#31308)#9

Open
shivshekhar12 wants to merge 1 commit into
litellm_internal_stagingfrom
fix/users/shiv/save-retry-policy
Open

fix(router): persist and apply retry_policy via update_settings (#31308)#9
shivshekhar12 wants to merge 1 commit into
litellm_internal_stagingfrom
fix/users/shiv/save-retry-policy

Conversation

@shivshekhar12

Copy link
Copy Markdown
Collaborator

Summary

retry_policy set in the Admin UI / config was silently dropped:

  • It was missing from UpdateRouterConfig, so Pydantic dropped it at parse time before the DB write.
  • It was missing from the Router.update_settings() allowlist, so a value loaded from the DB was never applied to the live router.

This PR:

  • Adds retry_policy: Optional[RetryPolicy] to UpdateRouterConfig (moved RetryPolicy above it so it can be referenced).
  • Adds retry_policy to the update_settings() allowlist.
  • Coerces the on-the-wire dict into a RetryPolicy instance before applying it to the live router.

Test plan

  • test_update_settings_retry_policyRouter.update_settings() accepts a retry_policy dict and coerces it into RetryPolicy.
  • DB-load path applies retry_policy to the live Router on startup.
  • POST /config/update persists retry_policy into the DB merged with existing values.
  • UpdateRouterConfig parses and serializes retry_policy correctly.

Fixes BerriAI#31308

Made with Cursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Router retry_policy set via UI/ POST / Config/update is silently dropped (never persisted or applied)

1 participant