From e1088967e2183b0951d7db9d7764bb39a8c1d2ab Mon Sep 17 00:00:00 2001 From: songkuan-zheng <252822057+songkuan-zheng@users.noreply.github.com> Date: Tue, 15 Sep 2026 07:04:33 +0000 Subject: [PATCH] fix(zai): keep the thinking override inside the type-discipline budget Main consumed the LIT001 budget headroom, so the override signature now takes Mapping for its parameters and marks the inherited dict/list return contracts as mutable-ok. Co-authored-by: songkuan-zheng <252822057+songkuan-zheng@users.noreply.github.com> Co-authored-by: songkuan-zheng --- litellm/llms/zai/chat/transformation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litellm/llms/zai/chat/transformation.py b/litellm/llms/zai/chat/transformation.py index a237bfca9b8..efe7bcd5d3c 100644 --- a/litellm/llms/zai/chat/transformation.py +++ b/litellm/llms/zai/chat/transformation.py @@ -60,11 +60,11 @@ class ZAIChatConfig(OpenAIGPTConfig): def _map_openai_params( self, - non_default_params: dict[str, object], - optional_params: dict[str, object], + non_default_params: Mapping[str, object], + optional_params: Mapping[str, object], model: str, drop_params: bool, - ) -> dict[str, object]: + ) -> dict[str, object]: # mutable-ok: dict return contract of OpenAIGPTConfig supported_openai_params: Final = frozenset(self.get_supported_openai_params(model)) reasoning_params: Final = MappingProxyType( {k: v for k, v in non_default_params.items() if k in ZAI_REASONING_PARAMS and k in supported_openai_params}