aeat.application.corpus_search._model_loader module¶
Shared model2vec loader for the semantic-search stack.
Both the build-time precompute
(_embed_build) and the runtime query embedder
(_query_embed) load the same
potion-multilingual-128M static model behind the capability-gated
aeat-cli[search] extra. This module is the one place that lazily imports
model2vec and refuses with an install hint when it is absent, so neither
consumer duplicates the gate and the degraded lexical-only mode never depends
on the semantic stack at import time.
- SEARCH_EXTRA_HINT¶
Install hint surfaced on every semantic-stack refusal.
- load_static_model(model_id, *, revision, cache_dir=None)[source]¶
Load a model2vec
StaticModel, refusing if thesearchextra is absent.- Parameters:
- Return type:
- Returns:
The loaded
StaticModel(typedAny— model2vec ships no stubs).- Raises:
CorpusSearchDependencyError – If
model2vecis not installed.