mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(router.py): fix high-traffic bug for usage-based-routing-v2
This commit is contained in:
parent
09bae3d8ad
commit
e7b4882e97
1 changed files with 4 additions and 1 deletions
|
@ -2779,7 +2779,10 @@ class Router:
|
|||
self.cache.get_cache(key=model_id, local_only=True) or 0
|
||||
)
|
||||
### get usage based cache ###
|
||||
if isinstance(model_group_cache, dict):
|
||||
if (
|
||||
isinstance(model_group_cache, dict)
|
||||
and self.routing_strategy != "usage-based-routing-v2"
|
||||
):
|
||||
model_group_cache[model_id] = model_group_cache.get(model_id, 0)
|
||||
|
||||
current_request = max(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue