fix: pass validated model_info to get_optional_params outside the args dict

Mixing model_info into optional_param_args widened the unpacked dict's value
type and added a basedpyright reportArgumentType error after rebasing on main.
Passing it as its own keyword, validated with str_keyed_mapping_or_none,
keeps the call typed and also keeps model_info out of the params handed to
pre_process_non_default_params.
This commit is contained in:
hx 2026-10-15 19:48:11 +08:00
parent 9778870e59
commit 3374207ff6

View file

@ -5848,7 +5848,6 @@ def completion(
"prompt_cache_retention": prompt_cache_retention,
"allowed_openai_params": allowed_openai_params,
"base_model": base_model,
"model_info": model_info if isinstance(model_info, dict) else None,
}
provider_reasoning_effort: Final = reasoning_effort_with_summary_alias(
resolved_reasoning_effort,