Repository navigation
[BugFix] Optimize turn-based /v1/realtime auto truncation - #8566
Conversation
|
This PR appears to belong to: docs/design/module/profiling.md, docs/design/module/entrypoints.md, docs/design/module/observability.md. Module owners: @alex-jw-brooks @linyueqian @gcanlin Routing: @alex-jw-brooks via module of the changed files, semantic router, CODEOWNERS; @linyueqian via module of the changed files, semantic router, CODEOWNERS; @gcanlin via module of the changed files @NickCao, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer. Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment. |
Omni ReviewBot routing recordAssigned Strict on zcode (GLM-5.3-Flash) under experiment |
Omni ReviewBot: three questions on the performance claim@NickCao this PR reads as a performance or value claim:
Before the full evidence checklist, three short questions:
When you answer, the evidence that settles it is: base and head SHA, hardware, model, workload, warm-up and repeat count, mean or percentiles with their spread, and a correctness/quality-equivalence signal; an end-to-end claim also needs stage attribution. |
This is primarily a correctness fix (to match the observed openai API behavior), with some added performance improvement (replacing a linear scan with bisect).
The current bottleneck is in prompt rendering during the scan for finding the cut to make the prompt fit under the budget, previously the linear scan would take O(n) to decide the number of turns to truncate, the bisect would take O(logn).
The gain is on latency, previously there would be a huge latency spike when auto truncation kicks in, with the new implementation the spike would be much flatter (O(n) -> O(logn))
|
Match OpenAI Realtime behavior by treating automatic truncation as model-context pruning rather than conversation-history deletion. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Nick Cao <ncao@redhat.com>
Use the model context length during speculative Realtime rendering and classify only input-length validation failures as over-limit, while separating prompt-window admission from final materialization. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Nick Cao <ncao@redhat.com>
Persist the first item included in the model context and use binary search to advance it during auto truncation, avoiding repeated full-history renders. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Nick Cao <ncao@redhat.com>
Exercise the full response-create path across truncation modes, render errors, cache isolation, history mutations, and active-response cancellation. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Nick Cao <ncao@redhat.com>
Use Realtime conversation item types for stored and preflight items so the model-context cursor contract is explicit. Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Nick Cao <ncao@redhat.com>
4af8c3f to
1f8483c
Compare
…m-project#8566) Signed-off-by: Nick Cao <ncao@redhat.com> Co-authored-by: Codex <noreply@openai.com>
…raction-asr Take main's vllm-project#8062 (scope multimodal UUIDs on a copy of the prompt) into scope_stage_replica_mm_uuids, which this PR shares between the engine and the orchestrator: the engine keeps main's signature and docstring, and the orchestrator's two scoping sites now use the returned copy. Keep the ChatParams/TokenizeParams import that _render_chat_deferred still uses after vllm-project#8566. Signed-off-by: Shuolei Wang <shuoleiwang123@gmail.com>
…m-project#8566) Signed-off-by: Nick Cao <ncao@redhat.com> Co-authored-by: Codex <noreply@openai.com>
Purpose
This PR fixes the Realtime auto-truncation issues identified in #8339 and aligns our behavior with the OpenAI Realtime GA model.
Previously, automatic truncation could remove items from retained conversation history and submit oversized prompts to the engine. This PR separates the two concepts:
Key changes:
conversation.item.deleted, and removed items remain available throughconversation.item.retrieve.Test Plan
vLLM Version: 0.31.0
vLLM-Omni Commit: 9d352ba
Test Result