Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "OpenAI Realtime 请求与会话规则"
created: 2026-10-06
updated: 2026-10-09
updated: 2026-10-13
type: rule
tags: [vllm-omni, components, serving]
sources: ["PR #7285", "PR #8279", "PR #8287", "PR #8294", "PR #8339", "PR #8566"]
sources: ["PR #7285", "PR #8279", "PR #8287", "PR #8294", "PR #8339", "PR #8566", "PR #8840"]
confidence: high
---

Expand Down Expand Up @@ -160,3 +160,12 @@ confidence: high
- 验收:覆盖不同源采样率、多 chunk/tail flush、text-only/tool suppression,断言发送
sample 数与 history duration 一致;覆盖 0/中间/末尾 truncate、缺 token/duration 与
tool responses;已有合法 content_index/audio length 检查先于 history 修改。^[PR #8339]

## VLLM-OMNI-PR8840-RT-CANCEL-CODE — 迟到/无目标的 response.cancel 必须返回 OpenAI 标准 response_cancel_not_active

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Route the cancel-code rule through the Direct map

When a Direct review is triggered by response.cancel, the page's quick map still routes that signal only to SERV-RT-1c, which does not contain this new error-code invariant. Because reviewers are expected to stop navigation after using the embedded quick map, they can miss the response_cancel_not_active requirement entirely; add this rule ID and _handle_response_cancel source entry to the existing map row and synchronize the nearest _index.md.

AGENTS.md reference: knowledge/AGENTS.md:L16-L16

Useful? React with 👍 / 👎.


- 触发:修改 turn-based `/v1/realtime` 连接层(`vllm_omni/entrypoints/openai/realtime/connection.py`)中 `response.cancel` 的错误码映射、`_handle_response_cancel`,或 realtime error 事件的 code/`event_id` 构造。
- 强制:cancel 与回复结束竞态——无 active response,或 `response_id` 指向非当前 active response——必须以 OpenAI Realtime 的标准错误码 `response_cancel_not_active`(常量 `RESPONSE_CANCEL_NOT_ACTIVE`)发送 error 事件,保留原消息文本并回显触发事件的 `event_id`;mismatch 的 cancel 不得设置 `_response_cancel_event`,也不得影响仍 active 的 response。
- 禁止:把该竞态映射为通用 `invalid_request_error`——Open WebUI 在除 `response_cancel_not_active` 之外的错误码上会直接结束通话,迟到的 cancel 因此丢掉整通语音通话;让无目标的 cancel 取消或篡改当前 active response;丢失 `event_id` 回显。
- 验收:参数化测试覆盖 active response 为 None 与 response_id 不匹配两种情况,断言 error code 等于 `RESPONSE_CANCEL_NOT_ACTIVE`、回显的 `event_id`、`_response_cancel_event` 未设置,且 active response 原样保留。^[PR #8840]

<!-- kb:rule status=active since=v0.30.0 -->
13 changes: 11 additions & 2 deletions knowledge/repos/vllm-omni/models/yue2/rules.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "YuE2 synthesis 与完成边界规则"
created: 2026-10-06
updated: 2026-10-06
updated: 2026-10-13
type: rule
tags: [vllm-omni, models, model-executor]
sources: ["PR #8407"]
sources: ["PR #8407", "PR #8851"]
confidence: high
---

Expand Down Expand Up @@ -32,3 +32,12 @@ confidence: high
- 强制:保留已完成音频和对应终止 token,直到 scheduler 接受该 end boundary。若完成 step 的输出被丢弃、resumed row 的 accepted count 尚未到 `end_len`,重新交付保留的音频与 end token,复用已完成 synthesis;非丢弃的完整 accepted sequence 才能作为 history reconciliation 边界。
- 禁止:finished row 无条件跳过而连续输出零 token;在重新交付时再次运行 synthesis;把未确认的部分 recompute 当作完整 accepted history;finish/abort 后遗留 job 或 timing state。
- 验收:确定性回归让 scheduler 丢弃交付 step,恢复后仍得到同一音频/end token且只完成一次 synthesis;再覆盖真实 eager/graph preemption、取消与后续请求恢复。^[PR #8407]

## VLLM-OMNI-PR8851-YUE2-SAMPLER-COST — 削减全词表一致性循环不得丢失边界覆盖

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the sampler-cost rule to the YuE2 Direct map

For a PR mentioning test_yue2_sampler.py, sampling-loop steps, or min_tokens, none of the four existing quick-map rows returns this newly added rule, so the Direct workflow can stop on unrelated synthesis/interface groups without applying these coverage constraints. Add a sampler/test-cost row pointing to this rule and its test file, and update the YuE2 _index.md so the owner route exposes the new concern.

AGENTS.md reference: knowledge/AGENTS.md:L16-L16

Useful? React with 👍 / 👎.


- 触发:以缩短 CI 时长为由修改 `tests/worker/test_yue2_sampler.py`(或同类在 CPU 上对全词表做逐行 `torch.multinomial` 一致性比对的测试)的循环步数、`min_tokens` 或 preset 默认值覆盖。
- 强制:步数削减必须由行为跨度论证:先断言生产默认值(ABC `min_tokens` 32、semantic 200),再替换成小于循环步数的 floor,使循环首步仍处于 end-token block、末步已释放;被门控路径须有独立确定性测试(temperature=0、手工构造 logits 令 end token 得分最高)证明 history 不足时被屏蔽、达到 floor 后放行;填满 semantic penalty window 的长-history alone-vs-batch case(60 token)不得随削减被删。
- 禁止:保留从不触达生产 floor 的重复抽样步;直接覆盖 preset 默认值而不先断言其生产取值;削减后让 min_tokens/end-token block、batched 与单行 `torch.multinomial` 的逐列对比或 per-request generator 同步推进失去覆盖;把 AMD CI 时长收益当作已验证结果陈述。
- 验收:缩减后每步仍对全部 184704 列对比 batched draw 与 `torch.multinomial` 并检查 generator 同步;`test_end_token_is_blocked_until_min_tokens` 在 abc 与 semantic 两个 phase 都先取 fallback、后取 end;本地运行整个测试文件维持秒级(本 PR 实测 9 passed in 1.20s)。40 步版本在 AMD `Simple · Other Test` 中约占 1175 秒(main #13631 实测)只是削减动机;该 PR 的 AMD 验证项未勾选,AMD 时长改善不得作为已验证结果或验收依据。^[PR #8851]

<!-- kb:rule status=active since=v0.30.0 -->
Loading