[FIX] Preserve YAML default stop words when request sends empty list (#2855)

Signed-off-by: Mike_Qiu <qiudayu.qdy@antgroup.com>
Co-authored-by: Mike_Qiu <qiudayu.qdy@antgroup.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-04-16 14:40:34 +00:00
1 parent 45760d61d2
commit 2ec91d4dfd
2 files changed
+180 -1

No files matched your search

+1 -1
View File
@@ -728,7 +728,7 @@ class OmniOpenAIServingChat(OpenAIServingChat, AudioMixin):
for field_name in self._OPENAI_SAMPLING_FIELDS:
value = getattr(request, field_name, None)
if value is not None:
if (value is not None and not isinstance(value, list)) or (isinstance(value, list) and len(value) > 0):
setattr(params, field_name, value)
return params