style(router): format auto setup files

This commit is contained in:
moe-berri 2026-09-03 17:52:55 -07:00
parent bc24f70391
commit c6a742baca
2 changed files with 6 additions and 10 deletions

View file

@ -389,7 +389,9 @@ def _deployment_pricing(raw_deployment: object) -> AutoSetupDeploymentPricing |
litellm_params: Final = _MODEL_REFERENCE_MAPPING.validate_python(
deployment.get("litellm_params", _EMPTY_MODEL_REFERENCE)
)
if any(litellm_params.get(field) not in (None, False, 0, 0.0, {}) for field in _AUTO_SETUP_UNSUPPORTED_PRICING_FIELDS):
if any(
litellm_params.get(field) not in (None, False, 0, 0.0, {}) for field in _AUTO_SETUP_UNSUPPORTED_PRICING_FIELDS
):
return None
published: Mapping[str, object] | None = None
published_raw: Mapping[str, object] | None = None
@ -407,8 +409,7 @@ def _deployment_pricing(raw_deployment: object) -> AutoSetupDeploymentPricing |
published_raw = _MODEL_REFERENCE_MAPPING.validate_python(raw)
break
if published_raw is not None and any(
published_raw.get(field) not in (None, False, 0, 0.0, {})
for field in _AUTO_SETUP_UNSUPPORTED_PRICING_FIELDS
published_raw.get(field) not in (None, False, 0, 0.0, {}) for field in _AUTO_SETUP_UNSUPPORTED_PRICING_FIELDS
):
return None
values: dict[str, object] = {}

View file

@ -226,10 +226,7 @@ def _resolve_groups(
{model.benchmark_model_id: model for model in _matching_snapshot_models(snapshot, deployment.model_refs)}
for deployment in deployments
]
if any(
len({model.identity.family_id for model in matches.values()}) > 1
for matches in match_sets
):
if any(len({model.identity.family_id for model in matches.values()}) > 1 for matches in match_sets):
excluded.append(AutoSetupInventoryExclusion(model_name, "mixed_model_group"))
continue
if any(not matches for matches in match_sets):
@ -354,9 +351,7 @@ def _cost_rank(profiles: Sequence[_AvailableProfile]) -> tuple[_AvailableProfile
profiles,
key=lambda profile: (
profile.cost_per_completed_task_usd is None,
profile.cost_per_completed_task_usd
if profile.cost_per_completed_task_usd is not None
else math.inf,
profile.cost_per_completed_task_usd if profile.cost_per_completed_task_usd is not None else math.inf,
-profile.quality.quality_lower_bound,
profile.model_name,
),