From c9117ec6c12fc0d23170be7eed5d63c7c6344259 Mon Sep 17 00:00:00 2001 From: Alexander Chernov Date: Mon, 24 Aug 2026 16:11:14 +0100 Subject: [PATCH] fix(chatgpt): annotate the input coercion for the type-discipline gate The LIT002 budget counts mutable-collection construction, and wrapping the string input builds a list and a dict, which put the total two over its ceiling. Both constructions are the wire payload this backend requires, so the list cannot be replaced with an immutable equivalent; annotate the line with a reason instead, matching the convention used elsewhere in the tree. LIT005 freezes reasonless suppressions at zero, so the reason is required rather than decorative. Signed-off-by: Alexander Chernov --- litellm/llms/chatgpt/responses/transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/chatgpt/responses/transformation.py b/litellm/llms/chatgpt/responses/transformation.py index 8c7999c3b11..c5f67b78654 100644 --- a/litellm/llms/chatgpt/responses/transformation.py +++ b/litellm/llms/chatgpt/responses/transformation.py @@ -69,7 +69,7 @@ class ChatGPTResponsesAPIConfig(OpenAIResponsesAPIConfig): # The Responses API accepts a string or a list, but this backend # rejects a string with {"detail": "Input must be a list"}. if isinstance(input, str): - input = [{"role": "user", "content": input}] + input = [{"role": "user", "content": input}] # mutable-ok: the wire payload this backend requires request: Final = super().transform_responses_api_request( model, input,