Skip to main content

try_embed_query_with_fallback

Function try_embed_query_with_fallback 

Source
pub fn try_embed_query_with_fallback(
    models_dir: &Path,
    query: &str,
) -> Result<Vec<f32>, FallbackReason>
Expand description

G58/S1: try to embed a query, mapping any failure to a structured FallbackReason so callers can route to FTS5 + LIKE fallback instead of returning exit 11 to the user.

This is the bridge between the hard-fail embed_query_local (used by write paths where embedding failure aborts the operation) and the graceful-degradation contract of recall / hybrid-search in v1.0.80.