Skip to content

standalone-indexer: hash image blocks with their image id again - #45

Draft
Shang-Pin wants to merge 1 commit into
v41-partial-skipfrom
mm-aware-hash
Draft

Shang-Pin wants to merge 1 commit into
v41-partial-skipfrom
mm-aware-hash

Conversation

@Shang-Pin

Copy link
Copy Markdown

Reverts #43.

Why

Token-only image hashing merges blocks of different images at the same position into one tree edge. The compressed radix tree keeps one engine block hash per edge position (edge_index), so the second chain's hashes only reach the worker lookup, resolve_lookup rejects them, and every later store of that conversation fails:

  • deepseek-ai/DeepSeek-V4.1-Flash reality/routing: steady 100-160 Failed to find parent block per minute since kvtest-c707ba7adb (previous image: ~0).
  • 5-minute ZMQ capture of one engine rank: all 241 misses trace to 14 image-bearing store events whose last block became unresolvable.
  • A query can also match a different image's path and report a hit the engine will not give.

Companion

deepapi now computes vLLM's image id in its KV probe and mixes it into image blocks exactly like compute_block_hash_for_seq (deepinfra/backend#5428; verified against a live engine: identical image ids and all 19 block hashes of a two-image chat). Roll out together: either half alone mismatches image blocks.

Also

docs.md: image blocks carry their image id; do not go token-only; known gap that /kv_recover TreeDumps are token-only for image blocks.

Validation

cargo test -p dynamo-kv-router --features kube-discovery --lib: 607 passed.

h24 line: companion PR.

🤖 Generated with Claude Code

Reverts "standalone-indexer: hash image blocks from tokens only" (#43).

Token-only image hashing merges blocks of different images at the same
position into one tree edge. The compressed radix tree keeps one engine
block hash per edge position (edge_index), so the second chain's hashes are
only added to the worker lookup, resolve_lookup rejects them, and every
later store of that conversation fails with ParentBlockNotFound: a steady
100-160/min on deepseek-ai/DeepSeek-V4.1-Flash reality and routing, all
traced to image-bearing stores in a live capture. It also lets a query match
a different image's path.

deepapi's KV probe now computes vLLM's image id and mixes it into image
blocks the same way (deepinfra/backend#5428), so the indexer can key image
blocks by content again. The two must roll out together.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Shang-Pin
Shang-Pin deployed to external_collaborator September 23, 2026 17:48 — with GitHub Actions Active
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 23, 2026

This branch was successfully deployed

1 active deployment
external_collaborator — 61764d85 Deployed Sep 23, 2026 by Shang-Pin via ok-to-test #49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant