From 3374207ff6a19aae99ce0c069ef68d9e3334884b Mon Sep 17 00:00:00 2001 From: hx <1367557521@qq.com> Date: Thu, 15 Oct 2026 19:48:11 +0800 Subject: [PATCH] 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. --- litellm/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/litellm/main.py b/litellm/main.py index ccf4cd1795d..327a7a1c4b5 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -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,