Skip to content

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 20, 2026

This PR adds basic validation for downloaded model files to prevent using corrupted or incomplete files.

Changes

  • Added a new utils::validation module.
  • Implemented checks for:
    • File existence
    • Minimum file size (100MB check for models)
    • GGUF header verification (first 4 bytes)
  • Updated models download command to validate files immediately after download.
  • If validation fails, the corrupted file is deleted and an error is reported.

Reasoning

Previously, network interruptions or other issues could result in corrupted files being saved and configured, leading to cryptic errors during search or server startup. This change ensures that only valid GGUF files are accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants