diff --git a/litellm/router.py b/litellm/router.py index de60d46e01d..22238996148 100644 --- a/litellm/router.py +++ b/litellm/router.py @@ -8156,13 +8156,10 @@ class Router: if ptu_error is not None and is_ptu_cost_attribution_enabled(): raise ValueError(ptu_error) zeroed_pricing: Final = zeroed_ptu_pricing(_model_info, _litellm_params) if config_sourced else None - litellm_params: Final[LiteLLM_Params] = LiteLLM_Params( - **( - _litellm_params - if zeroed_pricing is None - else MappingProxyType({**_litellm_params, **zeroed_pricing}) - ) + merged_params: Final[Mapping[str, Any]] = ( + _litellm_params if zeroed_pricing is None else MappingProxyType({**_litellm_params, **zeroed_pricing}) ) + litellm_params: Final[LiteLLM_Params] = LiteLLM_Params(**merged_params) warn_on_provider_credential_mismatch(model_name=_model_name, litellm_params=_litellm_params) deployment = Deployment( **deployment_info,