Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
10d34f74
Unverified
Commit
10d34f74
authored
Aug 21, 2025
by
gongwei-130
Committed by
GitHub
Aug 21, 2025
Browse files
fix: should return a invalid request response when schema missing (#9461)
parent
9ba72530
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
python/sglang/srt/entrypoints/openai/serving_chat.py
python/sglang/srt/entrypoints/openai/serving_chat.py
+5
-0
No files found.
python/sglang/srt/entrypoints/openai/serving_chat.py
View file @
10d34f74
...
...
@@ -81,6 +81,11 @@ class OpenAIServingChat(OpenAIServingBase):
f
"This model supports at most
{
server_context_length
}
completion tokens."
)
if
request
.
response_format
and
request
.
response_format
.
type
==
"json_schema"
:
schema
=
getattr
(
request
.
response_format
.
json_schema
,
"schema_"
,
None
)
if
schema
is
None
:
return
"schema_ is required for json_schema response format request."
return
None
def
_convert_to_internal_request
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment