From 8ad2894301b98ce6cab7b9de8079c466004c5d22 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 21 Feb 2026 22:05:18 +0100 Subject: [PATCH] fix(ai): batch-analyze uses user-configured model (Gemini 2.5) instead of hardcoded Llama 3.3 --- src/app/api/ai/batch-analyze/route.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/app/api/ai/batch-analyze/route.ts b/src/app/api/ai/batch-analyze/route.ts index 23a08f9..54a80c9 100644 --- a/src/app/api/ai/batch-analyze/route.ts +++ b/src/app/api/ai/batch-analyze/route.ts @@ -62,10 +62,6 @@ Format attendu: const userPrompt = `Analyse cette liste de produits :\n${JSON.stringify(products, null, 2)}`; - // Always use the free Llama 3.3 model for batch — not the user's settings model - // (settings model may be a paid model not suitable here) - const BATCH_MODEL = "meta-llama/llama-3.3-70b-instruct:free"; - const response = await fetch("https://openrouter.ai/api/v1/chat/completions", { method: "POST", headers: { @@ -73,7 +69,7 @@ Format attendu: "Content-Type": "application/json", }, body: JSON.stringify({ - model: BATCH_MODEL, + model, // uses the model configured in Settings (same as individual analysis) messages: [ { role: "system", content: systemPrompt }, { role: "user", content: userPrompt }