Skip to main content

Module model_verifier

Module model_verifier 

Source
Expand description

Startup model verification (design decision §3, RFC-021).

Runs at every startup. Checks that the files required for the configured embedding model are present and non-empty. Does not run SHA-256 hash verification — that is reserved for the explicit “Validate” action in the Models view (keeps startup under 5 ms).

The two required files inside the model directory:

  • onnx/model.onnx — the weights (typically 20–140 MB)
  • tokenizer.json — the tokenizer config (~2 MB)

Structs§

FileIssue
A single file that failed the verification check.

Enums§

FileIssueKind
Reason a required model file failed verification.
VerifyOutcome
Outcome of a startup model verification check.

Constants§

REQUIRED_MODEL_FILES
Files that must be present in the model directory.

Functions§

verify_embedding_model
Verify the embedding model directory at startup.
verify_outcome_summary
Run the verifier and return a brief log-friendly summary string (never includes file contents — NFR-014).