Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
9ccbf6b6
Unverified
Commit
9ccbf6b6
authored
Dec 15, 2025
by
RioS
Committed by
GitHub
Dec 14, 2025
Browse files
[responsesAPI]add extra body parameters (#30532)
Signed-off-by:
Ri0S
<
aa248424@gmail.com
>
parent
ae2e503d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
vllm/entrypoints/openai/protocol.py
vllm/entrypoints/openai/protocol.py
+9
-0
No files found.
vllm/entrypoints/openai/protocol.py
View file @
9ccbf6b6
...
...
@@ -320,6 +320,7 @@ class ResponsesRequest(OpenAIBaseModel):
max_tool_calls
:
int
|
None
=
None
metadata
:
Metadata
|
None
=
None
model
:
str
|
None
=
None
logit_bias
:
dict
[
str
,
float
]
|
None
=
None
parallel_tool_calls
:
bool
|
None
=
True
previous_response_id
:
str
|
None
=
None
prompt
:
ResponsePrompt
|
None
=
None
...
...
@@ -333,6 +334,7 @@ class ResponsesRequest(OpenAIBaseModel):
tools
:
list
[
Tool
]
=
Field
(
default_factory
=
list
)
top_logprobs
:
int
|
None
=
0
top_p
:
float
|
None
=
None
top_k
:
int
|
None
=
None
truncation
:
Literal
[
"auto"
,
"disabled"
]
|
None
=
"disabled"
user
:
str
|
None
=
None
...
...
@@ -387,6 +389,7 @@ class ResponsesRequest(OpenAIBaseModel):
_DEFAULT_SAMPLING_PARAMS
=
{
"temperature"
:
1.0
,
"top_p"
:
1.0
,
"top_k"
:
0
,
}
def
to_sampling_params
(
...
...
@@ -408,6 +411,10 @@ class ResponsesRequest(OpenAIBaseModel):
top_p
=
default_sampling_params
.
get
(
"top_p"
,
self
.
_DEFAULT_SAMPLING_PARAMS
[
"top_p"
]
)
if
(
top_k
:
=
self
.
top_k
)
is
None
:
top_k
=
default_sampling_params
.
get
(
"top_k"
,
self
.
_DEFAULT_SAMPLING_PARAMS
[
"top_k"
]
)
stop_token_ids
=
default_sampling_params
.
get
(
"stop_token_ids"
)
# Structured output
...
...
@@ -428,6 +435,7 @@ class ResponsesRequest(OpenAIBaseModel):
return
SamplingParams
.
from_optional
(
temperature
=
temperature
,
top_p
=
top_p
,
top_k
=
top_k
,
max_tokens
=
max_tokens
,
logprobs
=
self
.
top_logprobs
if
self
.
is_include_output_logprobs
()
else
None
,
stop_token_ids
=
stop_token_ids
,
...
...
@@ -435,6 +443,7 @@ class ResponsesRequest(OpenAIBaseModel):
RequestOutputKind
.
DELTA
if
self
.
stream
else
RequestOutputKind
.
FINAL_ONLY
),
structured_outputs
=
structured_outputs
,
logit_bias
=
self
.
logit_bias
,
)
def
is_include_output_logprobs
(
self
)
->
bool
:
...
...
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