[gpt-oss][2/N] Support input_messages in responsesRequest (#26962)

Signed-off-by: Andrew Xia <axia@fb.com>
Co-authored-by: Andrew Xia <axia@fb.com>
This commit is contained in:
Andrew Xia
2025-10-27 23:15:49 +00:00
committed by GitHub
co-authored by Andrew Xia
parent 69f064062b
commit 53a56e658b
7 changed files with 481 additions and 17 deletions
+7 -1
View File
@@ -47,6 +47,7 @@ from openai.types.responses import (
from openai.types.responses.response_reasoning_item import (
Content as ResponseReasoningTextContent,
)
from openai_harmony import Message as OpenAIHarmonyMessage
from vllm.utils.serial_utils import (
EmbedDType,
@@ -383,10 +384,15 @@ class ResponsesRequest(OpenAIBaseModel):
default=False,
description=(
"Dictates whether or not to return messages as part of the "
"response object. Currently only supported for non-streaming "
"response object. Currently only supported for"
"non-background and gpt-oss only. "
),
)
# similar to input_messages / output_messages in ResponsesResponse
# we take in previous_input_messages (ie in harmony format)
# this cannot be used in conjunction with previous_response_id
# TODO: consider supporting non harmony messages as well
previous_input_messages: list[OpenAIHarmonyMessage | dict] | None = None
# --8<-- [end:responses-extra-params]
_DEFAULT_SAMPLING_PARAMS = {