Describe the bug
Our ZMQ decoder reads only the first four positional fields of vLLM's BlockStored (block_hashes, parent_block_hash, token_ids, block_size) and drops the rest. Upstream BlockStored (vllm/distributed/kv_events.py) now also carries medium, lora_name, extra_keys, and group_idx. Two of these affect correctness:
group_idx: hybrid-attention models (sliding-window + full layers — Gemma, Ministral, Llama-4) hash the same token range into different KV-cache groups. Collapsing all groups into one hash space can produce false prefix matches.
medium: with KV offloading, blocks live on CPU/remote tiers, but we count every block as a GPU hit, so prefix routing over-credits pods that only hold the prefix on a slower tier.
lora_name is also the canonical adapter id (lora_id is deprecated upstream); prefix_cache.go currently passes loraID=-1 everywhere, so adapters aren't isolated in the index.
Relevant: pkg/cache/kvcache/msgpack_decoder.go (parseEventArray), pkg/plugins/gateway/algorithms/prefix_cache.go.
Steps to Reproduce
- Serve a hybrid-attention model (e.g.
google/gemma-2-9b-it) with --kv-events-config enabled.
- Send shared-prefix traffic across ≥2 replicas with the kv-event prefix router.
- Observe requests routed to pods that don't actually have a GPU prefix hit.
Expected behavior
Decoder parses group_idx/medium/lora_name; the index keys prefix entries by (model, lora_name, group_idx) and scores non-GPU mediums lower.
Environment
AIBrix: main · vLLM: main (kv-events enabled).
Describe the bug
Our ZMQ decoder reads only the first four positional fields of vLLM's
BlockStored(block_hashes, parent_block_hash, token_ids, block_size) and drops the rest. UpstreamBlockStored(vllm/distributed/kv_events.py) now also carriesmedium,lora_name,extra_keys, andgroup_idx. Two of these affect correctness:group_idx: hybrid-attention models (sliding-window + full layers — Gemma, Ministral, Llama-4) hash the same token range into different KV-cache groups. Collapsing all groups into one hash space can produce false prefix matches.medium: with KV offloading, blocks live on CPU/remote tiers, but we count every block as a GPU hit, so prefix routing over-credits pods that only hold the prefix on a slower tier.lora_nameis also the canonical adapter id (lora_idis deprecated upstream);prefix_cache.gocurrently passesloraID=-1everywhere, so adapters aren't isolated in the index.Relevant:
pkg/cache/kvcache/msgpack_decoder.go(parseEventArray),pkg/plugins/gateway/algorithms/prefix_cache.go.Steps to Reproduce
google/gemma-2-9b-it) with--kv-events-configenabled.Expected behavior
Decoder parses
group_idx/medium/lora_name; the index keys prefix entries by(model, lora_name, group_idx)and scores non-GPU mediums lower.Environment
AIBrix: main · vLLM: main (kv-events enabled).