[Bugfix] Trim stale consequence claims from unannotated-eagle warning (#56791)

Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Co-authored-by: Kimi Code <noreply@moonshot.cn>

Jiangyun Zhu committed Sep 14, 2026 at 21:06 UTC 47fbd36e6dc908277e386424beeb8647355c1c8b
2 files changed +19 -16
tests/v1/core/test_kv_cache_utils.py
+17 -4
@@ -4135,9 +4135,9 @@ def test_draft_group_not_annotated_without_spec_decode():
4135
4136
4137 def test_unidentifiable_draft_with_mamba_warns(caplog_vllm):
4138 - # No group carries the draft marker, so every consumer falls back to
4139 - # flagging all groups -- including Mamba ones, which then can never report
4140 - # a hit. That is silent today; it must at least be visible.
4138 + # No group carries the draft marker, so consumers fall back to
4139 + # conservative behavior that silently breaks reuse for Mamba groups.
4140 + # That must at least be visible.
4141 groups = get_kv_cache_groups(
4142 _spec_decode_grouping_config(), _hybrid_specs_with_draft(draft=False)
4143 )
@@ -4146,7 +4146,20 @@ def test_unidentifiable_draft_with_mamba_warns(caplog_vllm):
4146 assert "no KV cache group could be identified as the draft model's" in (
4147 caplog_vllm.text
4148 )
4149 - assert "Mamba groups" in caplog_vllm.text
4149 +
4150 +
4151 +def test_unidentifiable_draft_without_mamba_does_not_warn(caplog_vllm):
4152 + # Pure-attention models degrade gracefully under the consumers'
4153 + # conservative fallback (a one-block hit drop at most), so the warning
4154 + # stays silent to avoid noise on every unannotated EAGLE deployment.
4155 + specs = {
4156 + "target.attn.0": new_mla_spec(block_size=64),
4157 + "target.attn.1": new_mla_spec(block_size=64),
4158 + }
4159 + groups = get_kv_cache_groups(_spec_decode_grouping_config(), specs)
4160 +
4161 + assert not any(g.is_eagle_group for g in groups)
4162 + assert "could be identified as the draft model's" not in caplog_vllm.text
4163
4164
4165 def test_no_warning_when_draft_group_is_identified(caplog_vllm):
vllm/v1/core/kv_cache_utils.py
+2 -12
@@ -2182,12 +2182,7 @@ def _warn_if_unannotated_eagle_mamba(
2182 vllm_config: VllmConfig,
2183 kv_cache_groups: list[KVCacheGroupSpec],
2184 ) -> None:
2185 - """Warn when the flag-all eagle fallback will silently disable reuse.
2186 -
2187 - With no group annotated, consumers flag every group as a draft group. That
2188 - widens a Mamba group's required lookup window to two consecutive chunks,
2189 - which align-mode checkpointing never produces, so reuse drops to zero with
2190 - no error and no metric to show it.
2185 + """Warn when no KV cache group could be identified as the draft model's.
2186
2187 Args:
2188 vllm_config: Config supplying the speculative method, if any.
@@ -2210,13 +2205,8 @@ def _warn_if_unannotated_eagle_mamba(
2205 return
2206 logger.warning(
2207 "Speculative decoding (method=%s) is enabled but no KV cache group "
2213 - "could be identified as the draft model's, so every group -- "
2214 - "including Mamba groups %s -- will be treated as a draft group. A "
2215 - "Mamba group cannot satisfy the widened lookup window that implies, "
2216 - "so prefix-cache reuse across requests will be disabled and any "
2217 - "external KV offload tier will store without ever serving a hit.",
2208 + "could be identified as the draft model's.",
2209 spec_config.method,
2219 - mamba_groups,
2210 )
2211
2212