Skip to content

[Frontend] Supports resubmitting output items with missing fields in Responses API#41355

Merged
sfeng33 merged 5 commits intovllm-project:mainfrom
chaunceyjiang:validation
May 6, 2026
Merged

[Frontend] Supports resubmitting output items with missing fields in Responses API#41355
sfeng33 merged 5 commits intovllm-project:mainfrom
chaunceyjiang:validation

Conversation

@chaunceyjiang
Copy link
Copy Markdown
Collaborator

@chaunceyjiang chaunceyjiang commented Apr 30, 2026

Purpose

Add a unified input_item_parsing model validator to
ResponsesRequest that pre-processes input items before Pydantic
validates the ResponseInputOutputItem union.

When clients resubmit output items (e.g., reasoning blocks or
assistant messages) as input for subsequent turns, they may omit
fields such as id, status, or annotations. The OpenAI SDK
TypedDict / BaseModel types require these fields, so Pydantic
cannot match the bare dicts and throws verbose union-validation
errors.

Test Plan

# cd github/vllm
# codex .

...
....
Call,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShe
llCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResp
onse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,Respo
nseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeIn
terpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpLis
tTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem]', 'ResponseCustomToolCall', 'name'), 'msg': 'Field required', 'input': {'type': 'message',
'role': 'assistant', 'content': [{'type': 'output_text', 'text': '\\n\\n'}]}}, {'type': 'literal_error', 'loc': ('body', 'input', 'list[union[EasyInputMessageParam,Message,ResponseOutputMessageP
aram,ResponseFileSearchToolCallParam,ResponseComputerToolCallParam,ComputerCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCallParam,FunctionCallOutput,ToolSearchCall,ResponseToolS
earchOutputItemParamParam,ResponseReasoningItemParam,ResponseCompactionItemParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallParam,LocalShellCall,LocalShellCallOutput,ShellCall,Shell
CallOutput,ApplyPatchCall,ApplyPatchCallOutput,McpListTools,McpApprovalRequest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam,ResponseCustomToolCallParam,ItemReference,union[Respo
nseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,
ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,R
esponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomTo
olCallOutputItem],...]]', 4, 'union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCal
l,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellC
allOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalRespons
e,ResponseCustomToolCall,ResponseCustomToolCallOutputItem]', 'ResponseCustomToolCall', 'type'), 'msg': \"Input should be 'custom_tool_call'\", 'input': 'message', 'ctx': {'expected': \"'custom_t
ool_call'\"}}, {'type': 'missing', 'loc': ('body', 'input', 'list[union[EasyInputMessageParam,Message,ResponseOutputMessageParam,ResponseFileSearchToolCallParam,ResponseComputerToolCallParam,Com
puterCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCallParam,FunctionCallOutput,ToolSearchCall,ResponseToolSearchOutputItemParamParam,ResponseReasoningItemParam,ResponseCompactio
nItemParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallParam,LocalShellCall,LocalShellCallOutput,ShellCall,ShellCallOutput,ApplyPatchCall,ApplyPatchCallOutput,McpListTools,McpApprova
lRequest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam,ResponseCustomToolCallParam,ItemReference,union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,R
esponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompaction
Item,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,Response
ApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'union[ResponseOutputMessage,ResponseFile
SearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,Respon
seToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallO
utput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem]', 'Response
CustomToolCallOutputItem', 'call_id'), 'msg': 'Field required', 'input': {'type': 'message', 'role': 'assistant', 'content': [{'type': 'output_text', 'text': '\\n\\n'}]}}, {'type': 'missing', 'l
oc': ('body', 'input', 'list[union[EasyInputMessageParam,Message,ResponseOutputMessageParam,ResponseFileSearchToolCallParam,ResponseComputerToolCallParam,ComputerCallOutput,ResponseFunctionWebSe
archParam,ResponseFunctionToolCallParam,FunctionCallOutput,ToolSearchCall,ResponseToolSearchOutputItemParamParam,ResponseReasoningItemParam,ResponseCompactionItemParamParam,ImageGenerationCall,R
esponseCodeInterpreterToolCallParam,LocalShellCall,LocalShellCallOutput,ShellCall,ShellCallOutput,ApplyPatchCall,ApplyPatchCallOutput,McpListTools,McpApprovalRequest,McpApprovalResponse,McpCall,
ResponseCustomToolCallOutputParam,ResponseCustomToolCallParam,ItemReference,union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,Res
ponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCode
InterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpL
istTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCa
ll,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompac
tionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,Resp
onseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem]', 'ResponseCustomToolCallOutputItem', 'output'),
'msg': 'Field required', 'input': {'type': 'message', 'role': 'assistant', 'content': [{'type': 'output_text', 'text': '\\n\\n'}]}}, {'type': 'literal_error', 'loc': ('body', 'input', 'list[unio
n[EasyInputMessageParam,Message,ResponseOutputMessageParam,ResponseFileSearchToolCallParam,ResponseComputerToolCallParam,ComputerCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCal
lParam,FunctionCallOutput,ToolSearchCall,ResponseToolSearchOutputItemParamParam,ResponseReasoningItemParam,ResponseCompactionItemParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallPar
am,LocalShellCall,LocalShellCallOutput,ShellCall,ShellCallOutput,ApplyPatchCall,ApplyPatchCallOutput,McpListTools,McpApprovalRequest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam
,ResponseCustomToolCallParam,ItemReference,union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseCo
mputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCal
l,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpAp
provalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutput
Item,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,Resp
onseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpC
all,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem]', 'ResponseCustomToolCallOutputItem', 'type'), 'msg': \"Input should be 'custom_t
ool_call_output'\", 'input': 'message', 'ctx': {'expected': \"'custom_tool_call_output'\"}}, {'type': 'missing', 'loc': ('body', 'input', 'list[union[EasyInputMessageParam,Message,ResponseOutput
MessageParam,ResponseFileSearchToolCallParam,ResponseComputerToolCallParam,ComputerCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCallParam,FunctionCallOutput,ToolSearchCall,Respo
nseToolSearchOutputItemParamParam,ResponseReasoningItemParam,ResponseCompactionItemParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallParam,LocalShellCall,LocalShellCallOutput,ShellCa
ll,ShellCallOutput,ApplyPatchCall,ApplyPatchCallOutput,McpListTools,McpApprovalRequest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam,ResponseCustomToolCallParam,ItemReference,uni
on[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputI
tem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellTo
olCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,Response
CustomToolCallOutputItem],...]]', 4, 'union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseCompute
rToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,Loc
alShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprova
lResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem]', 'ResponseCustomToolCallOutputItem', 'id'), 'msg': 'Field required', 'input': {'type': 'message', 'role': 'assistant', 'conten
t': [{'type': 'output_text', 'text': '\\n\\n'}]}}, {'type': 'missing', 'loc': ('body', 'input', 'list[union[EasyInputMessageParam,Message,ResponseOutputMessageParam,ResponseFileSearchToolCallPar
am,ResponseComputerToolCallParam,ComputerCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCallParam,FunctionCallOutput,ToolSearchCall,ResponseToolSearchOutputItemParamParam,Response
ReasoningItemParam,ResponseCompactionItemParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallParam,LocalShellCall,LocalShellCallOutput,ShellCall,ShellCallOutput,ApplyPatchCall,ApplyPat
chCallOutput,McpListTools,McpApprovalRequest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam,ResponseCustomToolCallParam,ItemReference,union[ResponseOutputMessage,ResponseFileSearc
hToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToo
lSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput
,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'unio
n[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputIt
em,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToo
lCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseC
ustomToolCallOutputItem]', 'ResponseCustomToolCallOutputItem', 'status'), 'msg': 'Field required', 'input': {'type': 'message', 'role': 'assistant', 'content': [{'type': 'output_text', 'text': '
\\n\\n'}]}}, {'type': 'missing', 'loc': ('body', 'input', 'list[union[EasyInputMessageParam,Message,ResponseOutputMessageParam,ResponseFileSearchToolCallParam,ResponseComputerToolCallParam,Compu
terCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCallParam,FunctionCallOutput,ToolSearchCall,ResponseToolSearchOutputItemParamParam,ResponseReasoningItemParam,ResponseCompactionI
temParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallParam,LocalShellCall,LocalShellCallOutput,ShellCall,ShellCallOutput,ApplyPatchCall,ApplyPatchCallOutput,McpListTools,McpApprovalR
equest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam,ResponseCustomToolCallParam,ItemReference,union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,Res
ponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionIt
em,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseAp
plyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'ResponseReasoningItem', 'id'), 'msg': 'Fie
ld required', 'input': {'type': 'message', 'role': 'assistant', 'content': [{'type': 'output_text', 'text': '\\n\\n'}]}}, {'type': 'missing', 'loc': ('body', 'input', 'list[union[EasyInputMessag
eParam,Message,ResponseOutputMessageParam,ResponseFileSearchToolCallParam,ResponseComputerToolCallParam,ComputerCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCallParam,FunctionCa
llOutput,ToolSearchCall,ResponseToolSearchOutputItemParamParam,ResponseReasoningItemParam,ResponseCompactionItemParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallParam,LocalShellCall
,LocalShellCallOutput,ShellCall,ShellCallOutput,ApplyPatchCall,ApplyPatchCallOutput,McpListTools,McpApprovalRequest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam,ResponseCustomTo
olCallParam,ItemReference,union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,Re
sponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallO
utput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,Re
sponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'ResponseReasoningItem', 'summary'), 'msg': 'Field required', 'input': {'type': 'message', 'role': 'assistant', 'content': [{'ty
pe': 'output_text', 'text': '\\n\\n'}]}}, {'type': 'literal_error', 'loc': ('body', 'input', 'list[union[EasyInputMessageParam,Message,ResponseOutputMessageParam,ResponseFileSearchToolCallParam,
ResponseComputerToolCallParam,ComputerCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCallParam,FunctionCallOutput,ToolSearchCall,ResponseToolSearchOutputItemParamParam,ResponseRea
soningItemParam,ResponseCompactionItemParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallParam,LocalShellCall,LocalShellCallOutput,ShellCall,ShellCallOutput,ApplyPatchCall,ApplyPatchC
allOutput,McpListTools,McpApprovalRequest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam,ResponseCustomToolCallParam,ItemReference,union[ResponseOutputMessage,ResponseFileSearchTo
olCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerToolCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSe
archOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalShellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,Re
sponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalResponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'Respons
eReasoningItem', 'type'), 'msg': \"Input should be 'reasoning'\", 'input': 'message', 'ctx': {'expected': \"'reasoning'\"}}, {'type': 'literal_error', 'loc': ('body', 'input', 'list[union[EasyIn
putMessageParam,Message,ResponseOutputMessageParam,ResponseFileSearchToolCallParam,ResponseComputerToolCallParam,ComputerCallOutput,ResponseFunctionWebSearchParam,ResponseFunctionToolCallParam,F
unctionCallOutput,ToolSearchCall,ResponseToolSearchOutputItemParamParam,ResponseReasoningItemParam,ResponseCompactionItemParamParam,ImageGenerationCall,ResponseCodeInterpreterToolCallParam,Local
ShellCall,LocalShellCallOutput,ShellCall,ShellCallOutput,ApplyPatchCall,ApplyPatchCallOutput,McpListTools,McpApprovalRequest,McpApprovalResponse,McpCall,ResponseCustomToolCallOutputParam,Respons
eCustomToolCallParam,ItemReference,union[ResponseOutputMessage,ResponseFileSearchToolCall,ResponseFunctionToolCall,ResponseFunctionToolCallOutputItem,ResponseFunctionWebSearch,ResponseComputerTo
olCall,ResponseComputerToolCallOutputItem,...,ResponseToolSearchCall,ResponseToolSearchOutputItem,ResponseCompactionItem,ImageGenerationCall,ResponseCodeInterpreterToolCall,LocalShellCall,LocalS
hellCallOutput,ResponseFunctionShellToolCall,ResponseFunctionShellToolCallOutput,ResponseApplyPatchToolCall,ResponseApplyPatchToolCallOutput,McpCall,McpListTools,McpApprovalRequest,McpApprovalRe
sponse,ResponseCustomToolCall,ResponseCustomToolCallOutputItem],...]]', 4, 'ResponseReasoningItem', 'content', 0, 'type'), 'msg': \"Input should be 'reasoning_text'\", 'input': 'output_text', 'c
tx': {'expected': \"'reasoning_text'\"}}]","type":"Bad Request","param":null,"code":400}}

this pr

<img width="2047" height="503" alt="image" src="https://github.com/user-attachments/assets/4273a89f-9616-477e-8f8e-b988900c9ed4" />


Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the frontend label Apr 30, 2026
@chaunceyjiang chaunceyjiang added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 30, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the input parsing logic in vllm/entrypoints/openai/responses/protocol.py to support reasoning items and assistant messages, including automatic ID generation and default status assignment. Feedback was provided to add a type check for the content field in assistant messages to prevent potential TypeError exceptions when processing malformed input.

Comment thread vllm/entrypoints/openai/responses/protocol.py Outdated
…Responses API

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
…Responses API

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Copy link
Copy Markdown
Collaborator

@sfeng33 sfeng33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, since ResponseInputOutputItem has 50+ possible types in its union, I think this is the ideal fix that is minimal and correct.

@sfeng33 sfeng33 merged commit c7aa186 into vllm-project:main May 6, 2026
50 checks passed
@chaunceyjiang chaunceyjiang deleted the validation branch May 6, 2026 02:24
chaojun-zhang pushed a commit to chaojun-zhang/vllm that referenced this pull request May 6, 2026
…Responses API (vllm-project#41355)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
amd-mghanimi pushed a commit to amd-mghanimi/vllm that referenced this pull request May 6, 2026
…Responses API (vllm-project#41355)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: Mehdi Ghanimifard <mehdi.ghanimifard@amd.com>
Copilot AI pushed a commit to hongbolv/vllm that referenced this pull request May 7, 2026
…Responses API (vllm-project#41355)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Co-authored-by: hongbolv <33214277+hongbolv@users.noreply.github.com>
ikaadil pushed a commit to ikaadil/vllm that referenced this pull request May 7, 2026
…Responses API (vllm-project#41355)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: Ifta Khairul Alam Adil <ikaadil007@gmail.com>
libinta pushed a commit to libinta/vllm that referenced this pull request May 8, 2026
…Responses API (vllm-project#41355)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: Libin Tang <libin.tang@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants