Skip to content

fix: reject vLLM previous_input_messages and enable_response_messages - #570

Merged
franciscojavierarceo merged 1 commit into
vllm-project:mainfrom
sniper35:fix/reject-vllm-history-extensions
Nov 19, 2026
Merged

franciscojavierarceo merged 1 commit into
vllm-project:mainfrom
sniper35:fix/reject-vllm-history-extensions

Conversation

@sniper35

@sniper35 sniper35 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A Responses request carrying vLLM's previous_input_messages extension was forwarded upstream after rehydration had already built the item history. On gpt-oss, vLLM rendered that history in front of the rehydrated one: a previous_response_id turn with a contradictory previous_input_messages went from 177 to 204 input tokens and still returned 200. Sent directly, vLLM rejects that combination, but behind the gateway it never sees previous_response_id. enable_response_messages: true was also forwarded, and the requested input_messages/output_messages never reached the client. Both are now rejected at admission in validate_modeled_extensions(), next to the top_logprobs check. Fixes #571; refs #314, vllm-project/vllm#68575.

Changes by API

API What changed
Responses (/v1/responses, HTTP JSON/SSE and WebSocket, split-execution hydration) Non-empty previous_input_messages and enable_response_messages: true return 400 invalid_request_error, code: "unsupported_parameter", with the member as param. Absent, null, [] and false are still accepted.

Test Plan

  • Recordings: none added. I cannot record the OpenAI reference (no OpenAI credentials); the create-response reference defines neither member. The gateway behavior is admission-only (no upstream request) and is covered the same way as background and prompt.
  • Extended the existing rejection tests with both members: test_unsupported_parameters_are_rejected_for_both_store_values (HTTP envelope, store × stream), websocket_rejects_unsupported_parameters_and_keeps_the_connection, unsupported_parameters_test (executor in both stream modes with no upstream call, and rehydrate_conversation), and the unsupported.rs unit tests (param/code; null/[]/false accepted).
  • cargo fmt --all -- --check and cargo clippy --workspace --all-targets -- -D warnings: pass.
  • cargo test --workspace --no-fail-fast: 3222 passed, 4 failed, 25 ignored; main (8c1cd74) on the same runner: 3219 passed, 6 failed, 25 ignored. All failures on both are executor::inference::tests::error_bodies::streaming_error_timeout_* idle-timeout tests (the branch's 4 are a subset of main's 6); run alone, they pass on both.
  • pre-commit run --all-files and mkdocs build: pass.

This touches the same rejection-test arrays and docs section as #496; I'll rebase whichever lands second.

AI assistance was used for the analysis and the test harness; I reviewed the change and the results.

The gateway resolves previous_response_id and conversation history
itself and forwarded these unmodeled vLLM extensions upstream. On
Harmony models the supplied history was rendered on top of the
resolved one, bypassing vLLM's previous_response_id exclusivity check;
the requested upstream messages never reached the client.

Reject them at admission in validate_modeled_extensions() with
unsupported_parameter, accepting null, [] and false.

Signed-off-by: Dong Wang <dongw2019@gmail.com>
@franciscojavierarceo
franciscojavierarceo merged commit e8ce5ef into vllm-project:main Nov 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Executor forwards vLLM previous_input_messages after rehydration, so gpt-oss renders a second item history

2 participants