Skip to content

Commit

Permalink
Merge branch 'BerriAI:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
vincelwt authored May 3, 2024
2 parents 3677d56 + c6a9b46 commit 508e535
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion litellm/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -2669,13 +2669,18 @@ def update_settings(self, **kwargs):
"cooldown_time",
]

_existing_router_settings = self.get_settings()
for var in kwargs:
if var in _allowed_settings:
if var in _int_settings:
_casted_value = int(kwargs[var])
setattr(self, var, _casted_value)
else:
if var == "routing_strategy":
# only run routing strategy init if it has changed
if (
var == "routing_strategy"
and _existing_router_settings["routing_strategy"] != kwargs[var]
):
self.routing_strategy_init(
routing_strategy=kwargs[var],
routing_strategy_args=kwargs.get(
Expand Down

0 comments on commit 508e535

Please sign in to comment.