Skip to content

[Frontend][Responses] Reject empty assistant message content with 400 instead of 500 - #64941

Open
shadowmodder wants to merge 2 commits into
vllm-project:mainfrom
shadowmodder:shadowmodder/bugbash/responses-empty-content
Open

shadowmodder wants to merge 2 commits into
vllm-project:mainfrom
shadowmodder:shadowmodder/bugbash/responses-empty-content

Conversation

@shadowmodder

Copy link
Copy Markdown

Fixes #64940.

An assistant message with an empty content list ({"type": "message", "role": "assistant", "content": []}) passed request validation but crashed the render path with IndexError in _construct_message_from_response_item, returning a 500. This rejects it at validation with a clear 400, following the precedent of #55974.

An assistant message with an empty content list passed request
validation (coerced to ResponseOutputMessage) but crashed the render
path with IndexError in _construct_message_from_response_item
(item.content[0]), producing a 500. Reject it at validation with a
clear 400 instead, following the precedent of vllm-project#55974.

Signed-off-by: shadowmodder <sudhir.vissa@sage7.ai>

@claude claude Bot left a comment

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment /ci run for upstream CI or /amd-ci run for AMD CI only whenever CI signals are needed.

Once the PR is approved or has the ready label, the PR author can also use the corresponding /ci run, /ci retry, and /ci cancel commands, or their /amd-ci variants. New commits do not start upstream CI automatically.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

@mergify

mergify Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @shadowmodder.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Nov 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Responses API 500s on assistant message with empty content list

1 participant