Pass completion_response_model as str or None to _priced_provider_response_model

basedpyright counted the bare variable as partially unknown (reportUnknownArgumentType +1 over the budget).
This commit is contained in:
Eduardo Pessin 2026-10-01 19:27:43 +01:00
parent 2479c23828
commit fd60471a84

View file

@ -888,7 +888,9 @@ def _select_model_name_for_cost_calc(
base_model
if base_model is not None
else _priced_provider_response_model(
provider_response_model, completion_response_model, custom_llm_provider
provider_response_model,
completion_response_model if isinstance(completion_response_model, str) else None,
custom_llm_provider,
)
)