From b31e48f95aa8b8f7e69716f31323fe136e35965d Mon Sep 17 00:00:00 2001 From: hx <1367557521@qq.com> Date: Sat, 3 Oct 2026 00:01:30 +0800 Subject: [PATCH] chore: drop *-ok markers that suppress nothing (LIT013) --- litellm/litellm_core_utils/thinking_param_translation.py | 2 +- litellm/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/litellm_core_utils/thinking_param_translation.py b/litellm/litellm_core_utils/thinking_param_translation.py index 0ebdb5b3667..fc23b226bcb 100644 --- a/litellm/litellm_core_utils/thinking_param_translation.py +++ b/litellm/litellm_core_utils/thinking_param_translation.py @@ -131,7 +131,7 @@ def _thawed(value: object) -> object: def thaw_mapping(mapping: Mapping[str, object]) -> dict[str, object]: # mutable-ok: JSON request body - return {key: _thawed(item) for key, item in mapping.items()} # mutable-ok: JSON request body + return {key: _thawed(item) for key, item in mapping.items()} def _map_thinking_to_extra_body( diff --git a/litellm/utils.py b/litellm/utils.py index 58ef90ad0ff..c6ee757c559 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -5231,12 +5231,12 @@ def _translate_thinking_in_params( {key: value for key, value in thinking_values.items() if value is not None} ) return ( - { # mutable-ok: get_optional_params keeps mutating passed_params downstream + { **passed_params, **thinking_values, "extra_body": thaw_mapping(translated.extra_body), }, - {**untouched_non_default, **surviving_thinking_values}, # mutable-ok: _check_valid_arg pops unsupported keys + {**untouched_non_default, **surviving_thinking_values}, )