Repository navigation
[Frontend][Responses] Reject empty assistant message content with 400 instead of 500 - #64941
shadowmodder wants to merge 2 commits into
Conversation
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>
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: 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. 🚀 |
|
This pull request has merge conflicts that must be resolved before it can be |
Fixes #64940.
An assistant message with an empty content list (
{"type": "message", "role": "assistant", "content": []}) passed request validation but crashed the render path withIndexErrorin_construct_message_from_response_item, returning a 500. This rejects it at validation with a clear 400, following the precedent of #55974.