mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test(router): annotate the budget filter return values
The two helpers return the deployments the filter kept and the debug string. Name that as a sequence of model-list entries. Co-authored-by: abeed09 <abeed09@users.noreply.github.com>
This commit is contained in:
parent
f370e7f342
commit
72e1c69e6d
1 changed files with 2 additions and 2 deletions
|
|
@ -174,7 +174,7 @@ def _apply_budget_filter(
|
|||
request_tags: Sequence[str],
|
||||
spend_key: str,
|
||||
spend: float,
|
||||
):
|
||||
) -> tuple[Sequence[DeploymentTypedDict], str]:
|
||||
limiter: Final = RouterBudgetLimiting(dual_cache=DualCache(), provider_budget_config=None)
|
||||
limiter.provider_budget_config = provider_budget
|
||||
limiter.deployment_budget_config = deployment_budget
|
||||
|
|
@ -190,7 +190,7 @@ def _apply_budget_filter(
|
|||
)
|
||||
|
||||
|
||||
def _filter_one(scope: _Scope, config: BudgetConfig, spend: float):
|
||||
def _filter_one(scope: _Scope, config: BudgetConfig, spend: float) -> tuple[Sequence[DeploymentTypedDict], str]:
|
||||
match scope:
|
||||
case "provider":
|
||||
return _apply_budget_filter(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue