feat(tests): add Ministral 3 vision tests and improve invoice extraction pipeline to use Ollama chat schema, sanitization, and multi-page support

This commit is contained in:
2026-01-18 02:53:24 +00:00
parent b316d98f24
commit 7652a2df52
5 changed files with 824 additions and 57 deletions

View File

@@ -358,3 +358,16 @@ export async function ensureQwen25(): Promise<boolean> {
// Then ensure the Qwen2.5 model is pulled
return ensureOllamaModel('qwen2.5:7b');
}
/**
* Ensure Ministral 3 8B model is available (for structured JSON extraction)
* Ministral 3 has native JSON output support and OCR-style document extraction
*/
export async function ensureMinistral3(): Promise<boolean> {
// First ensure the Ollama service (MiniCPM container) is running
const ollamaOk = await ensureMiniCpm();
if (!ollamaOk) return false;
// Then ensure the Ministral 3 8B model is pulled
return ensureOllamaModel('ministral-3:8b');
}