  For a real $r\geq 0,$ we consider the notion of $r$-homotopy equivalence in
the category quasimetric spaces, which includes metric spaces and directed
graphs. We show that for a finite quasimetric space $X$ there is a unique (up
to isometry) $r$-homotopy equivalent quasimetric space of the minimal possible
cardinality. It is called the $r$-minimal model of $X$. We use this to
construct a decomposition of the magnitude-path spectral sequence of a digraph
into a direct sum of spectral sequences with certain properties. We also
construct an $r$-homotopy invariant ${\rm SH}^r_{n,I}(X)$ of a quasimetric
space $X,$ called spectral homology, that generalizes many other invariants:
the pages of the magnitude-path spectral sequence, including path homology,
magnitude homology, blurred magnitude homology and reachability homology.
