[V1][Bugfix] Fix assertion when mm hashing is turned off (#12439)

Signed-off-by: Roger Wang <ywang@roblox.com>
This commit is contained in:
Roger Wang 2025-01-26 00:47:42 -08:00 committed by GitHub
parent fa63e710c7
commit 0ee349b553
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -58,7 +58,8 @@ class Request:
# Sanity check
assert len(self.mm_inputs) == len(self.mm_positions)
assert len(self.mm_inputs) == len(self.mm_hashes)
if self.mm_hashes:
assert len(self.mm_inputs) == len(self.mm_hashes)
# Cache the computed kv block hashes of the request to avoid
# recomputing.