From 70e540ddc86412cd5058e3ca410ddfadaf62f8d3 Mon Sep 17 00:00:00 2001 From: "ZOU Yi (BD/SWD-WDE1)" Date: Tue, 4 Aug 2026 10:50:58 +0800 Subject: [PATCH] chore(sap): suppress LIT002 on choices fallback list with reason --- litellm/llms/sap/chat/handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/sap/chat/handler.py b/litellm/llms/sap/chat/handler.py index db8973815b7..53537726047 100755 --- a/litellm/llms/sap/chat/handler.py +++ b/litellm/llms/sap/chat/handler.py @@ -60,7 +60,7 @@ class _StreamParser: model_dump() calls in the streaming handler don't raise "'MockValSer' object is not an instance of 'SchemaSerializer'" """ - for choice in payload.get("choices") or []: + for choice in payload.get("choices") or []: # mutable-ok: only iterated, never mutated if isinstance(choice, dict) and not choice.get("logprobs"): choice.pop("logprobs", None) chunk = OpenAIChatCompletionChunk.model_validate(payload)