[bugfix] Fix online serving crash when text type response_format is received (#26822)

Signed-off-by: cjackal <44624812+cjackal@users.noreply.github.com>
Signed-off-by: j0shuajun <59368606+j0shuajun@users.noreply.github.com>
Co-authored-by: j0shuajun <59368606+j0shuajun@users.noreply.github.com>
This commit is contained in:
cjackal
2026-01-16 13:23:54 +09:00
committed by GitHub
parent 5de6dd0662
commit 35bf5d08e8
6 changed files with 68 additions and 26 deletions

View File

@@ -67,6 +67,11 @@ class StructuredOutputsParams:
"You can only use one kind of structured outputs constraint "
f"but multiple are specified: {self.__dict__}"
)
if count < 1:
raise ValueError(
"You must use one kind of structured outputs constraint "
f"but none are specified: {self.__dict__}"
)
def all_constraints_none(self) -> bool:
"""