mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
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 <alexander@chernov.it>
This commit is contained in:
parent
9aaf01d8ea
commit
c9117ec6c1
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue