adapter_id_hash

Function adapter_id_hash 

Source
pub fn adapter_id_hash(name: &str, generation: u64) -> u64
Expand description

2026-09-25: The adapter’s cache-identity key, which keeps prefix and KV reuse within one adapter. It is FNV-1a over the adapter’s name, then over generation’s little-endian bytes when generation != 0. It never depends on the pool slot, so an adapter moved to another slot keeps its id. A swap into a slot bumps that slot’s generation, which changes the id. 0 is reserved for the base model, so a hash of 0 becomes 1.